-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
81 lines (71 loc) · 1.75 KB
/
docker-compose.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
x-app: &default-app
build:
context: ./backend
dockerfile: Dockerfile
args:
BUILD_ENVIRONMENT: "${DOCKER_BUILD_ENVIRONMENT:-production}"
cache_from:
- "${DOCKER_BUILD_IMAGE_PREFIX}/backend:latest"
image: "${DOCKER_BUILD_IMAGE_PREFIX}/backend:${DOCKER_BUILD_IMAGE_TAG:-latest}"
depends_on:
- postgres
environment:
- ALLOWED_HOSTS
- CSRF_TRUSTED_ORIGINS
- ADMIN_URL
- STATIC_URL
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- DEBUG
- SECRET_KEY
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- CELERY_FLOWER_USER
- CELERY_FLOWER_PASSWORD
- CELERY_BROKER_URL
services:
backend:
<<: *default-app
command: /start_django
celery-worker:
<<: *default-app
command: /start_celeryworker
celery-beat:
<<: *default-app
depends_on:
- backend
command: /start_celerybeat
flower:
<<: *default-app
command: /start_flower
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
target: production
args:
BUILD_ENVIRONMENT: "${DOCKER_BUILD_ENVIRONMENT:-production}"
cache_from:
- "${DOCKER_BUILD_IMAGE_PREFIX}/frontend:latest"
image: "${DOCKER_BUILD_IMAGE_PREFIX}/frontend:${DOCKER_BUILD_IMAGE_TAG:-latest}"
environment:
- NEXT_PUBLIC_BACKEND_URL
- NEXTAUTH_GOOGLE_CLIENT_ID
- NEXTAUTH_GOOGLE_CLIENT_SECRET
- NEXTAUTH_URL
- NEXTAUTH_SECRET
postgres:
image: docker.io/postgres:12.6
volumes:
- production_postgres_data:/var/lib/postgresql/data:Z
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
redis:
image: docker.io/redis:6.0
volumes:
production_postgres_data: {}