-
Notifications
You must be signed in to change notification settings - Fork 67
/
docker-compose.yml
43 lines (41 loc) · 915 Bytes
/
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
version: "3"
services:
platform:
container_name: platform
network_mode: ${NETWORK_MODE}
build:
context: .
dockerfile: Dockerfile
environment:
- PORT=80
- POSTGRES_HOST=pgdb
ports:
- 8080:80
env_file:
- .env
depends_on:
pgdb:
condition: service_healthy
restart: unless-stopped
pgdb:
container_name: pgdb
network_mode: ${NETWORK_MODE}
image: postgres:12
restart: unless-stopped
volumes:
- type: volume
source: pgdb-data
target: "/var/lib/postgresql/data"
environment:
POSTGRES_DB: ${DBNAME}
POSTGRES_USER: ${DBUSER}
POSTGRES_PASSWORD: ${DBPASS}
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DBUSER}"]
interval: 30s
timeout: 30s
retries: 3
volumes:
pgdb-data: