-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
66 lines (61 loc) · 1.36 KB
/
docker-compose.yml
File metadata and controls
66 lines (61 loc) · 1.36 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
services:
backend:
build: .
container_name: backend-session-auth
ports:
- "${APP_PORT}:${APP_PORT}"
env_file:
- .env.development
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
networks:
- backend-net
volumes:
- ./:/app
- /app/node_modules
command: yarn start:dev
develop:
watch:
- action: sync
path: .
target: /app
- action: rebuild
path: package.json
- action: rebuild
path: yarn.lock
postgres:
image: postgres:15
container_name: postgres
ports:
- "${POSTGRES_PORT}:5432"
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
volumes:
- postgres-data:/var/lib/postgresql/data
restart: unless-stopped
networks:
- backend-net
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7
container_name: redis
command: redis-server --requirepass "${REDIS_PASSWORD}"
ports:
- "${REDIS_PORT}:6379"
restart: unless-stopped
networks:
- backend-net
volumes:
postgres-data:
networks:
backend-net: