-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
44 lines (39 loc) · 857 Bytes
/
docker-compose.yaml
File metadata and controls
44 lines (39 loc) · 857 Bytes
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
x-image: &IMAGE ${DOCKER_IMAGE}:${DOCKER_IMAGE_TAG}
services:
api:
user: node:node
image: *IMAGE
ports:
- 8081:8081
volumes:
- ./src:/api/src:delegated,ro
env_file:
- .env
depends_on:
- postgres
secrets:
- source: secret
target: "/api/secret.json"
uid: "1000" # default node uid
gid: "1000" # default node gid
command: pnpm di:start:watch
postgres:
image: postgres:14.1-alpine
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- pg-data:/var/lib/postgresql/data
pnpm:
user: node:node
image: *IMAGE
volumes:
- .:/api:delegated,rw
command: "yarn"
volumes:
pg-data:
secrets:
secret:
file: "./secret.json"