-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (59 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
65 lines (59 loc) · 1.08 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
name: docker-tmux-tutorial
x-defaults: &defaults
init: true
tty: true
restart: on-failure:2
networks:
- tmux_tut_network
volumes:
db_data:
redis_data:
networks:
tmux_tut_network:
services:
web:
<<: *defaults
ports:
- "5175:5175"
command: npm run dev
build:
args:
APP: web
context: .
volumes:
- ./apps/web:/usr/src/app
- /usr/src/app/node_modules
api:
<<: *defaults
ports:
- "3000:3000"
command: npm run dev
build:
args:
APP: api
context: .
volumes:
- ./apps/api:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- db
db:
image: postgres:18-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5433
ports:
- "5433:5433"
volumes:
- db_data:/var/lib/postgresql
- ./db:/docker-entrypoint-initdb.d
# Cache Service
redis:
image: redis:latest
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data