Use the Main branch
to set up and test the app locally.
The web service is a flask app.
The db service is a postgresql databse.
In this version, both services run on the same host.
Ensure docker & docker-compose is intalled in the server Docker on Ubuntu installation
- Clone the repo into the weblog direcotory
git clone git@github.com:myportfolio-tech/wcBlog.git weblog
- Navigate the project folder
cd weblog
- The docker-compose file pulls images from a public repo. You don't need to build the image with docker-compose
4. Bownload the images and bring up the containers with ```console docker-compose up ``` For testing, avoid the -d parameter to troubleshoot flask requests on the command line.
Check the app is running locally
.
You should be able to:
- Register
- Sign in
- Create a post
- Edit a post
- Reset password
The docker-compose file sets up a persistant volume.
volumes:
- postgres_data:/var/lib/postgresql/data/
Stop the conatiners and restart them. Test that users and posts are still available.