-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (58 loc) · 1.41 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
version: "3.7"
services:
backend:
image: ${DOCKER_IMAGES_PREFIX}/backend:${PARCHIN_VERSION}
restart: unless-stopped
build: backend/
environment:
- DJANGO_SETTINGS_MODULE
- POSTGRES_HOST=database
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- PARCHIN_SECRET_KEY
- RECAPTCHA_SERVER_KEY
- KAVENEGAR_TOKEN
- KAVENEGAR_TEMPLATE_NAME
volumes:
- backend_static_files:/app/static/
ports:
- "80"
depends_on:
- database
database:
image: postgres:14.4-alpine3.16
restart: unless-stopped
ports:
- $DB_PORT_MAPPING
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
volumes:
- ./.db-data/:/var/lib/postgresql/data
frontend:
build: ./frontend
image: ${DOCKER_IMAGES_PREFIX}/frontend:${PARCHIN_VERSION}
environment:
- API_BASE_URL
volumes:
- frontend_files:/mnt/frontend/
nginx:
image: nginx:1.23.0-alpine
ports:
- "443:443"
- "80:80"
restart: unless-stopped
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
- $FULLCHAIN_PATH:/etc/ssl-files/fullchain.pem:ro
- $PRIVKEY_PATH:/etc/ssl-files/privkey.pem:ro
- backend_static_files:/app/static/:ro
- frontend_files:/mnt/frontend/:ro
depends_on:
- backend
- frontend
volumes:
backend_static_files:
frontend_files: