Coder Social home page Coder Social logo

devops_security_task_blog's Introduction

Technology Blog made with Contentful CMS

This is a task for school. It is a (example) blog which fetches data from Contentful CMS and it as a CI/CD pipeline with Github Actions.

Running my container

I automatically build a container from the newest version. To run the website:

  1. Download and run container

    docker run . -e "Contentfuloptions__DeliveryApiKey=<your token>"  -e "Contentfuloptions__ManagementApiKey=<optional cma_access_token>" -e "Contentfuloptions__PreviewApiKey=<your key>" -e "Contentfuloptions__SpaceId=<your space ID>" -e "Contentfuloptions__UsePreviewApi=false" -e "Contentfuloptions__MaxNumberOfRateLimitRetries=0" -p 8080:80 janpeterd/aspnet-techblog
  2. access it at http://localhost:8080

Building own docker container

  1. clone the repo: git clone https://github.com/janpeterd/devops_security_task_blog.git
  2. cd into repo
  3. docker build . -t techblog
  4. docker run . -e "Contentfuloptions__DeliveryApiKey=<your token>" -e "Contentfuloptions__ManagementApiKey=<optional cma_access_token>" -e "Contentfuloptions__PreviewApiKey=<your key>" -e "Contentfuloptions__SpaceId=<your space ID>" -e "Contentfuloptions__UsePreviewApi=false" -e "Contentfuloptions__MaxNumberOfRateLimitRetries=0" -p 8080:80 techblog
  5. access it at http://localhost:8080

You need to set all of the env-variables to the keys of your contentful instance.

Developing/ running local

  1. For development/ running the application locally you can put the ENV-values in the .env file at project root
  2. dotnet build .
  3. dotnet run
# This are the env-values place them in a .env file at project root
Contentfuloptions__DeliveryApiKey="<your token>"
Contentfuloptions__ManagementApiKey="<optional cma_access_token>"
Contentfuloptions__PreviewApiKey="<your key>"
Contentfuloptions__SpaceId="<your space ID>"
Contentfuloptions__UsePreviewApi=false
Contentfuloptions__MaxNumberOfRateLimitRetries=0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.