-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.dev.yml
53 lines (49 loc) · 1.41 KB
/
docker-compose.dev.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
# VSCode devcontainer configuration
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
environment:
FONTAWESOME_PACKAGE_TOKEN: ${FONTAWESOME_PACKAGE_TOKEN}
ports:
- "8101:8101"
volumes:
- .:/app:cached
command: sleep infinity # Keep the container running
# Just send SIGKILL to stop the container (no grace period for `sleep infinity`)
# https://docs.docker.com/compose/faq/#why-do-my-services-take-10-seconds-to-recreate-or-stop
stop_signal: SIGKILL
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
environment:
POSTGRES_SERVER: db
POSTGRES_PORT: 5432
POSTGRES_DB: mydatabase
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- "8100:8100"
volumes:
- .:/app:cached
command: sleep infinity # Keep the container running
depends_on:
- db
# Just send SIGKILL to stop the container (no grace period for `sleep infinity`)
# https://docs.docker.com/compose/faq/#why-do-my-services-take-10-seconds-to-recreate-or-stop
stop_signal: SIGKILL
db:
image: postgres:15
environment:
POSTGRES_DB: mydatabase
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- "8102:5432"
volumes:
- db-data:/var/lib/postgresql/data
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
volumes:
db-data: