-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
34 lines (34 loc) · 1.06 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
version: '3.8'
services:
tool:
build:
context: ./
dockerfile: Dockerfile
network: host
volumes:
- ./demo/sample_app/:/host_files
depends_on:
db:
condition: service_healthy
environment:
POSTGRES_PASSWORD: demo_pwd
POSTGRES_DATABASE: postgres
POSTGRES_USER: postgres
POSTGRES_HOST: db
command: [ "-c", "/host_files/config.yml", "-n", "1", "/host_files/queries.sql" ]
db:
image: postgres:alpine
command: ['postgres', '-c', 'max_wal_senders=0', '-c', 'wal_level=minimal', '-c', 'shared_buffers=512MB', '-c', 'max_wal_size=10GB']
environment:
POSTGRES_PASSWORD: demo_pwd
PGDATA: /var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD", "/bin/bash", "/check_db_status.sh" ]
interval: 1s
timeout: 1s
retries: 200
start_period: 0.5s
volumes:
- ./demo/database/initdb/:/docker-entrypoint-initdb.d:ro
- ./demo/database/check_db_status.sh:/check_db_status.sh:ro
- ./demo/database/postgres.conf:/etc/postgresql/postgresql.conf