Note - Early work in progress. Day 1 of Docker
flask: Contains the Flask application and uWSGI application server
nginx: Contains the Nginx web server
redis: Contains the Redis cache
mongo: Contains the MongoDB database
Python version: 3.7.1
Web framework: Flask
Database: MongoDB (Using the Mongoengine driver)
Cache: Redis
App server: uWSGI
Web server: Nginx
Front end: Bootsrap4
- Pull this repo
- Update the username & password for mongo in
docker-compose.yml
- Update the password for redis in
docker-compose.yml
- Update the mongo & redis username & passwords in
flask/app/__init__.py
docker-compose up --build
- Go to
127.0.0.1/
in your browser
Consider installing MongoDB compass and connect to the mongo container for a helpful debugging & data exploring tool
Remove the following lines from docker-compose.yml
to remove the exposed mongo ports for production
ports:
- "27017:27017"
- Write a solid nginx.conf
- Automate SSL certs
- Better handling/automation of usernames, passwords & environment variables. Look into
.env
file - Integrate a celery container & setup background tasks
- Learn more about Docker
Mongo auth has been a bit buggy
Feedback welcome!