48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
version: '3.8'
|
|
services:
|
|
db:
|
|
image: postgres:15
|
|
environment:
|
|
POSTGRES_USER: admin
|
|
POSTGRES_PASSWORD: password
|
|
POSTGRES_DB: sop_monitoring
|
|
FORCE_RESTART: 2
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- ./db:/docker-entrypoint-initdb.d
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
db_fixer:
|
|
image: alpine
|
|
restart: "no"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
command: >
|
|
sh -c "find /var/lib/postgresql/data -name pg_hba.conf -exec sed -i 's/hostssl/host/g' {} + || true; find /var/lib/postgresql/data -name pg_hba.conf -exec sh -c 'echo \"host all all all md5\" >> \"$1\"; echo \"host all all all scram-sha-256\" >> \"$1\"' _ {} \;"
|
|
|
|
|
|
api:
|
|
build: ./api
|
|
environment:
|
|
- DB_HOST=db
|
|
- DB_USER=admin
|
|
- DB_PASS=password
|
|
- DB_NAME=sop_monitoring
|
|
- DB_PORT=5432
|
|
- PORT=3000
|
|
depends_on:
|
|
- db
|
|
restart: always
|
|
|
|
ui:
|
|
build: ./ui
|
|
expose:
|
|
- "80"
|
|
depends_on:
|
|
- api
|
|
restart: always
|
|
|
|
volumes:
|
|
pgdata:
|