-
Notifications
You must be signed in to change notification settings - Fork 84
/
docker-compose.production.yml
77 lines (72 loc) · 1.7 KB
/
docker-compose.production.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
services:
backend_prod:
container_name: backend_prod
build:
context: .
ports:
- 4444:8000
env_file:
- .env
environment:
NODE_ENV: production
DB_HOST: backend_db_prod
DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@backend_db_prod:5432/${DB_NAME}
networks:
- prod-net
depends_on:
backend_db_prod:
condition: service_healthy
restart: always
command: sh -c "sleep 10 && yarn start"
backend_db_prod:
image: postgres:13
container_name: backend_db_prod
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
#- ./init-scripts:/docker-entrypoint-initdb.d
ports:
- 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- prod-net
# nginx:
# image: nginx:latest
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./nginx/sites-available/expressjs:/etc/nginx/sites-available/expressjs
# - ./nginx/sites-enabled:/etc/nginx/sites-enabled
# - /etc/letsencrypt:/etc/letsencrypt
# - ./nginx-entrypoint.sh:/docker-entrypoint.sh
# networks:
# - app
# depends_on:
# - backend
# restart: always
rabbitmq:
image: rabbitmq:3-management
container_name: rmq_prod
ports:
- "5672"
# - "5672:5672"
- "15672"
# - "15672:15672"
networks:
- prod-net
networks:
prod-net:
driver: bridge
volumes:
postgres-data: