-
The first time
git clonethis projectcd community/- Unzip the
<secrets-zip>in the root of the project
-
Every time
docker-compose up --build- 💣 One command! That's it!
-
This will bring up the following containers:
- Django API (with memcached) and Nginx listening on
localhost:8000
- Django API (with memcached) and Nginx listening on
- The API server connects to a PostgreSQL server that is hosted on a Google Cloud Compute instance
- The API server uploads all files to the bucket
communitystoragein Google Cloud Storage.
-
Networking in docker-compose:
- [Host port : Container-Network Port]
- Container IP is available to other containers as service-name in
docker-compose.yml
-
Docker volumes for sharing data between containers.
-
Useful commands:
docker system prune- remove all dangling imagesdocker ps -a- list all containersdocker stop <x>,docker remove <x>to remove containersdocker exec -it <x> /bin/bash- to interactively connect to a containerdocker-compose up --build