- There are four Docker containers for this application. You will need to have the appropriate Docker desktop for your system. The Docker binaries will need to be in your
PATH, including thedocker-composefunction. - This program was written using Visual Studio Code. While not required that you use this editor, it will make development easier.
- You will need a version of Python >= 3.6 on your host system. Both
pythonandpipwill need to be in yourPATH.
git clone git@github.com:jarrettmeyer/python_rq_demo.git
cd python_rq_demo
pip install virtualenv
virturalenv venv
The activation script will vary on your system. On Windows, the following command will activate the virtual environment.
.\venv\Scripts\activate
Your mileage may vary.
docker-compose build
docker-compose up -d
The -d flag will run the containers in the background. To the following command will show the logs for a given container.
docker-compose logs <service-name>
or
docker-compose logs --follow <service-name>
On Windows...
$env:FLASK_APP = 'web.py'Run the database migrations. This will update the database schema, adding tables, sequences, indexes, etc. for the application. Migrations are managed with Flask-Migrate.
flask db upgrade
Finally, open your browser to http://localhost. You should now see the application up and running successfully.
The down command will bring down all running containers.
docker-compose down
Send questions to jarrettmeyer at gmail dot com.
Send bugs to Github issuess.