Add files necessary for production deployment
* Dockerfile, docker-compose template * nginx config * uwsgi config * wait-for-postgres script * requirements.txt * Some other stuff Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
35
docker-compose.example.yaml
Normal file
35
docker-compose.example.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
build: .
|
||||
volumes:
|
||||
- "static:/app/static"
|
||||
- "media:/app/media"
|
||||
- ".:/app"
|
||||
depends_on:
|
||||
- db
|
||||
env_file:
|
||||
- env/app.env
|
||||
- env/db.env
|
||||
restart: always
|
||||
nginx:
|
||||
image: "nginx:latest"
|
||||
depends_on:
|
||||
- app
|
||||
ports:
|
||||
- "8000:80"
|
||||
volumes:
|
||||
- "static:/usr/share/nginx/html/static"
|
||||
- "media:/usr/share/nginx/html/media"
|
||||
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
|
||||
restart: always
|
||||
db:
|
||||
image: "postgres:14-alpine"
|
||||
env_file:
|
||||
- env/db.env
|
||||
volumes:
|
||||
- "./db/postgres:/var/lib/postgresql/data"
|
||||
restart: always
|
||||
volumes:
|
||||
static:
|
||||
media:
|
||||
Reference in New Issue
Block a user