-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
53 lines (47 loc) · 1.01 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
51
52
53
version: "3.9"
x-common-variables: &common-variables
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-template}
services:
dbpg:
container_name: ${PROJECT_NAME}_postgres
image: postgres
environment:
<<: *common-variables
PGDATA: /data/postgres
ports:
- "5432:5432"
volumes:
- ./db-pgdata:/var/lib/postgresql/data/pgdata
networks:
- backend
restart: unless-stopped
web:
environment:
<<: *common-variables
POSTGRES_HOST: dbpg
MAX_CONCURRENCY: 1
HOST: "0.0.0.0"
PORT: "5000"
container_name: ${PROJECT_NAME}_web
image: kms:test
build:
context: .
args:
- HOST_UID=${HOST_UID:-9000}
- HOST_USER=${HOST_USER:-app}
ports:
- "5000:5000"
depends_on:
- dbpg
volumes:
- ./:/app
networks:
- backend
restart: unless-stopped
networks:
backend:
driver: bridge
volumes:
db-pgdata: