@@ -47,11 +47,13 @@ Replace the board and list ids with the respective ids from your Trello board.
4747## Running the App
4848
4949Once the all dependencies have been installed, start the Flask app in development mode within the Poetry environment by running:
50+
5051``` bash
5152$ poetry run flask run
5253```
5354
5455You should see output similar to the following:
56+
5557``` bash
5658 * Serving Flask app ' todo_app/app'
5759 * Debug mode: on
@@ -62,6 +64,7 @@ Press CTRL+C to quit
6264 * Debugger is active!
6365 * Debugger PIN: 113-666-066
6466```
67+
6568Now visit [ ` http://localhost:5000/ ` ] ( http://localhost:5000/ ) in your web browser to view the app.
6669
6770## Running the Tests
@@ -79,9 +82,9 @@ $ poetry run pytest
79823 . Replace the IP address in the ` inventory ` file with the IP address(es) of the managed VM(s)
80834 . Create a file ` ansible-pw.txt ` containing the vault password
81845 . Run the following command in the ` ansible ` directory, to provision the VM:
82- ``` bash
83- $ ansible-playbook playbook.yml -i inventory --vault-password-file ansible-pw.txt
84- ```
85+ ``` bash
86+ $ ansible-playbook playbook.yml -i inventory --vault-password-file ansible-pw.txt
87+ ```
8588
8689### Note on env variables
8790
@@ -100,7 +103,23 @@ then enter the value you want to encrypt when prompted.
100103
101104## Docker
102105
106+ Run the project with mounting:
107+ ``` bash
108+ docker build --target development --tag todo-app:dev .
109+ docker run -dit \
110+ --name todo-app-dev \
111+ -p 8000:8000 \
112+ --env-file .env \
113+ --mount type=bind,source=" $( pwd) /todo_app" ,target=/app/todo_app,readonly \
114+ todo-app:dev
115+ ```
116+
117+ Run the project in production environment:
103118``` bash
104- docker build --tag todo-app .
105- docker run -p 8000:8000 --env-file .env todo-app
119+ docker build --target production --tag todo-app:prod .
120+ docker run -dit \
121+ --name todo-app-prod \
122+ -p 8000:8000 \
123+ --env-file .env \
124+ todo-app:prod
106125```
0 commit comments