-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
50 lines (49 loc) · 1.3 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
49
50
version: '3.4'
services:
server:
container_name: makerspace_server
image: server
depends_on:
- db
build:
context: ./
dockerfile: ./Dockerfile
target: production
volumes:
- ./:/home/node/app/src
expose:
- '3000'
ports:
- 3000:3000
command: npm run start && npm run knex:migrate:latest
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
db:
image: postgres
command: postgres -c config_file=/etc/postgresql.conf
container_name: makerspace_db
build:
context: ./
dockerfile: ./Dockerfile
volumes:
- ${POSTGRES_CONFIG_HOST_PATH}:/etc/postgresql.conf # Custom postgresql config
ports:
- "5433:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
testdb:
image: postgres
command: postgres -c config_file=/etc/postgresql.conf
container_name: test_db
volumes:
- ${POSTGRES_CONFIG_HOST_PATH}:/etc/postgresql.conf # Custom postgresql config
ports:
- "5434:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}