-
Notifications
You must be signed in to change notification settings - Fork 159
/
docker-compose.yml
79 lines (75 loc) · 1.64 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
services:
app:
container_name: muzer-docker
build:
context: ./next-app
dockerfile: Dockerfile.dev
env_file:
- ./next-app/.env
ports:
- "3000:3000"
- "5555:5555"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./next-app:/usr/src/app
- /usr/src/app/node_modules
postgres:
container_name: prisma-postgres
image: postgres:alpine
restart: always
env_file:
- ./next-app/.env
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
redis:
container_name: redis-server
image: redis/redis-stack:latest
restart: always
env_file:
- ./ws/.env
ports:
- "6379:6379"
- "8001:8001"
environment:
REDIS_ARGS: "--requirepass root --user admin on >root ~* allcommands --user default off nopass nocommands"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
websockets:
container_name: websockets
restart: always
build:
context: ./ws
dockerfile: Dockerfile.dev
env_file:
- ./ws/.env
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./ws:/usr/src/app
- /usr/src/app/node_modules
volumes:
postgres-data:
external: false
redis-data:
external: false