-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (58 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
58 lines (58 loc) · 1.26 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
name: auth_system
services:
prod-api:
build:
context: .
target: production
container_name: prod_api
command: >
sh -c "pnpm prisma migrate deploy &&
pnpm prisma db seed &&
pnpm start:prod"
ports:
- '3000:3000'
env_file:
- .env.production
depends_on:
prod-db:
condition: service_healthy
restart: unless-stopped
networks:
- prod_infra_net
prod-db:
build:
context: .
dockerfile: Dockerfile.db
container_name: prod_db
command: >
postgres -c shared_preload_libraries=pg_cron
-c cron.database_name=auth_system
ports:
- '5432:5432'
env_file:
- .env.production
volumes:
- prod_db_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- prod_infra_net
prod-redis:
image: redis:7-alpine
container_name: prod_redis
command: redis-server --appendonly yes
volumes:
- prod_redis_data:/data
restart: unless-stopped
networks:
- prod_infra_net
volumes:
prod_db_data:
prod_redis_data:
networks:
prod_infra_net:
driver: bridge