This template contains example code for docker-compose files, largely for my own reference. I intend to create a more project agnostic true template in the future
- clone the repo
- rename the desired docker-compose template to
docker-compose.yml
, stripping the appended designator
- use the
docker-compose_template.yml
file as a reference in modifying (or creating) your docker-compose file
- remove the any unused docker-compose files
- customize all files as needed
- run the
docker-compose
command appropriate to the template used (see Corresponding Commands below)
Template | Corresponding docker-compose Command |
Source |
---|---|---|
docker-compose_django-redis-postgres.yml | docker-compose up --build -d , docker-compose run web /usr/local/bin/python manage.py migrate |
Django Development with Docker Compose |
docker-compose_fastapi-postgres-pytest.yml | docker-compose up --build -d |
Test Driven Development with FastAPI and Docker |
docker-compose_django-postgres.yml | docker-compose run web django-admin startproject composeexample . , docker-compose up |
Docker Quickstart: DJango and Compose |