-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (48 loc) · 1.22 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
services:
database:
image: postgres:16.3
restart: on-failure
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: atlas
ports:
- 5432:5432
volumes:
- ./data:/var/lib/postgresql/data
# for prod only
# https://github.com/nodejs/docker-node/blob/main/README.md#how-to-use-this-image
app:
# dockerfile unused for now
# TODO: use dockerfile because dependencies exist, I have not deployed this to prod yet.
# build: .
image: node:18.20.4-bookworm-slim
user: node
working_dir: /home/node/app
restart: on-failure
ports:
- 3000:3000
depends_on:
- database
environment:
- NODE_ENV=production
command: "npm start"
volumes:
- ./:/home/node/app
dev:
# dockerfile unused for now
# TODO: use dockerfile because dependencies exist, I have not deployed this to prod yet.
# build: .
image: node:18.20.4-bookworm-slim
user: node
working_dir: /home/node/app
restart: on-failure
ports:
- 3000:3000
depends_on:
- database
environment:
- NODE_ENV=development
command: "npm start"
volumes:
- ./:/home/node/app:ro # TODO this may cause issues?