-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.51 KB
/
docker-compose.yml
File metadata and controls
81 lines (77 loc) · 2.51 KB
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
services:
postgres:
image: postgres:latest
container_name: rdi-postgres
environment:
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
expose:
- '5432:5432'
volumes:
- rdi-pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}"]
interval: 1s
retries: 3
start_period: 3s
timeout: 3s
frontend:
container_name: rdi-frontend
build:
context: ./frontend
dockerfile: ./Dockerfile
expose:
- "6901:6901"
develop:
watch:
- action: sync
path: ./frontend
target: /frontend_src
ignore:
- node_modules/
backend:
environment:
- DATABASE_NAME=${DATABASE_NAME}
- DATABASE_USER=${DATABASE_USER}
- DATABASE_PASSWORD=${DATABASE_PASSWORD}
- DATABASE_PORT=${DATABASE_PORT}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
- DEBUG=${DEBUG}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- CSRF_COOKIE_SAMESITE=${CSRF_COOKIE_SAMESITE}
- SESSION_COOKIE_SAMESITE=${SESSION_COOKIE_SAMESITE}
- CSRF_COOKIE_HTTPONLY=${CSRF_COOKIE_HTTPONLY}
- SESSION_COOKIE_HTTPONLY=${SESSION_COOKIE_HTTPONLY}
- CSRF_COOKIE_SECURE=${CSRF_COOKIE_SECURE}
- SESSION_COOKIE_SECURE=${SESSION_COOKIE_SECURE}
- CORS_EXPOSE_HEADERS=${CORS_EXPOSE_HEADERS}
- CORS_ALLOW_CREDENTIALS=${CORS_ALLOW_CREDENTIALS}
container_name: rdi-backend
build:
context: ./backend
dockerfile: ./Dockerfile
expose:
- "6900:6900"
depends_on:
postgres:
condition: service_healthy
develop:
watch:
- action: sync
path: ./backend
target: /backend_src
restart: unless-stopped
nginx:
container_name: rdi-nginx
build:
context: ./nginx
dockerfile: ./Dockerfile
ports:
- "1337:80"
depends_on:
- "backend"
volumes:
rdi-pg_data: