-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
47 lines (44 loc) · 948 Bytes
/
docker-compose.yaml
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
version: '3.8'
services:
app:
image: cti_server
build:
context: .
dockerfile: Dockerfile
target: production
args: []
command: [/app/bin/cti_server]
init: true
ports:
- 3000:3000
environment:
PORT: "3000"
HOST_IP: "0.0.0.0"
DATABASE_URL: postgres://cti_user:example@db:5432/cti_dev_diesel
depends_on:
db:
condition: service_healthy
networks: [dbnet]
# https://hub.docker.com/_/postgres
db:
image: postgres
init: true
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: cti_user
POSTGRES_PASSWORD: example
POSTGRES_DB: cti_dev
# POSTGRES_INITDB_ARGS: "--data-checksums"
PGDATA: /pgdata
volumes:
- ./tmp/pgdata:/pgdata
networks: [dbnet]
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5s
timeout: 3s
retries: 3
networks:
dbnet: