-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 1.21 KB
/
docker-compose.yml
File metadata and controls
60 lines (57 loc) · 1.21 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
version: "3.8"
services:
web:
#image: node:20
build:
context: "./web"
target: "base"
volumes:
- ./web:/app
- ./web/docker-entrypoint.sh:/docker-entrypoint.sh
working_dir: /app
environment:
NODE_ENV: development
PORT: 3000
API_BASEURL: http://localhost:4001
init: true
command: sh -c "npm install && npm run envsubst && npm start"
ports:
- "3000:3000"
depends_on:
- api
api:
#image: node:20-slim
build:
context: "./api"
target: "base"
volumes:
- ./api:/app
working_dir: /app
environment:
NODE_ENV: development
PORT: 4001
DB_HOST: db
DB_USER: postgres
DB_PASSWORD: postgres
DB_DATABASE: hello
# DB_PORT: 5432
init: true
command: sh -c "npm install && npm start"
ports:
- "4001:4001"
depends_on:
- db
db:
image: postgres
volumes:
- postgres-data:/var/lib/postgresql/data:delegated
- ./db/initdb.d:/docker-entrypoint-initdb.d/
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=hello
ports:
- "5432:5432"
restart: always
volumes:
postgres-data: