-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
49 lines (49 loc) · 1.57 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: "3"
volumes: { home, db, minio1, minio2, redis, venv }
networks: { default }
services:
db:
environment: ["POSTGRES_USER=django", "POSTGRES_PASSWORD=django"]
image: "mdillon/postgis:9.6-alpine"
volumes: ["db:/var/lib/postgresql/data"]
ports: ["5432:5432"]
redis:
image: "redis:3.2-alpine"
volumes: ["redis:/data"]
ports: ["6379:6379"]
minio:
command: "server /export"
environment: ["MINIO_ACCESS_KEY=djangos3", "MINIO_SECRET_KEY=djangos3"]
image: "minio/minio"
volumes: ["minio1:/export", "minio2:/root/.config"]
networks: { default: { aliases: ["minio", "min.io"] } }
ports: ["9000:9000"]
backend: &backend
build:
context: .
dockerfile: "conf/docker/Dockerfile"
command: "poetry run django-admin runserver_plus 0.0.0.0:8000 --nopin"
depends_on: ["db", "minio", "redis"]
env_file: ".env"
environment:
PYTHONPATH: "/var/www/src"
PYTHONDONTWRITEBYTECODE: "nope"
stdin_open: true
tty: true
volumes:
- "home:/root"
- "venv:/var/www/.venv"
- "./pyproject.toml:/var/www/pyproject.toml"
- "./poetry.lock:/var/www/poetry.lock"
- "./src:/var/www/src"
- "./conf:/var/www/conf"
- "./Makefile:/var/www/Makefile"
celery:
<<: *backend
command: "poetry run celery worker --app webapp --loglevel info --beat --scheduler django_celery_beat.schedulers:DatabaseScheduler --task-events "
web:
image: "nginx:mainline-alpine"
depends_on: ["backend"]
ports: ["8000:80"]
volumes:
- "./conf/docker/nginx.conf:/etc/nginx/nginx.conf"