Git Product home page Git Product logo

devops-course-starter's Introduction

DevOps Apprenticeship: Project Exercise

Getting started

Installing Poetry

Installation instructions can be found https://python-poetry.org/docs/%23installation.

Environment variables

you will need to take a copy of .env-template and call .env to which you will then need to provide values for
TRELLO_KEY
TRELLO_TOKEN APP_BOARD_NAME='To Do App' TRELLO_USER='' TRELLO_ENDPOINT='https://api.trello.com/1/'

The project uses a virtual environment to isolate package dependencies. To create the virtual environment and install required packages, run the following from a bash shell terminal in the directory todo-app:

On macOS and Linux

$ poetry install

On Windows (Using Git Bash)

$ poetry install

Once the setup script has completed and all packages have been installed, start the Flask app by running:

$ poetry run flask run

Your app should now be running in daemon mode:

 * Serving Flask app "app" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with fsevents reloader
 * Debugger is active!
 * Debugger PIN: 226-556-590

Now visit http://localhost:5000/ in your web browser to view the app.

Run using vagrant

If you havent already you will want to install vagrant details found https://www.vagrantup.com/docs/installation

Using a terminal you should change directory to this project and run the following

vagrant up

vagrant will begin to build your app using gunicorn rather than flask, once the build scripts stop providing feedback you can now visit http://localhost:5000/ in your web browser to view the app.

Run using docker

Development

build

docker build --target development --tag todo-app:dev . 

run

docker run --env-file ./.env -p 5000:5000 --mount type=bind,source="$(pwd)"/todo-app,target=/todo-app todo-app:dev

Production

build

docker build --target production --tag todo-app:prod . 

run

docker run --env-file ./.env -p 5000:5000 --mount type=bind,source="$(pwd)"/todo-app,target=/todo-app todo-app:prod

Run using docker compose (with image build)

docker compose up --build

devops-course-starter's People

Contributors

brendanmcdaniel avatar tom-bell-softwire avatar jonesey13 avatar

Watchers

James Cloos avatar

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.