-
Notifications
You must be signed in to change notification settings - Fork 125
/
docker-compose.yaml
62 lines (61 loc) · 1.96 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: decider
services:
web:
restart: unless-stopped
container_name: decider-web
env_file: .env
depends_on:
db:
condition: service_healthy
build:
context: .
dockerfile: ./docker/web/Dockerfile
ports:
- '${WEB_IP}:${WEB_PORT}:5000'
environment:
# decider config
KIOSK_MODE: 'yes'
# db to [connect to, build]
DB_HOSTNAME: ${DB_HOSTNAME}
DB_PORT: ${DB_PORT}
DB_DATABASE: ${DB_DATABASE}
# db admin user [for building db]
DB_ADMIN_NAME: ${DB_ADMIN_NAME}
DB_ADMIN_PASS: ${DB_ADMIN_PASS}
# db kiosk user [run app under]
DB_KIOSK_NAME: ${DB_KIOSK_NAME}
DB_KIOSK_PASS: ${DB_KIOSK_PASS}
# app admin [create]
APP_ADMIN_EMAIL: ${APP_ADMIN_EMAIL}
APP_ADMIN_PASS: ${APP_ADMIN_PASS}
# cart encryption key
CART_ENC_KEY: ${CART_ENC_KEY}
# app endpoint [to display to user]
WEB_IP: ${WEB_IP}
WEB_PORT: ${WEB_PORT}
volumes:
- type: bind
source: ./config
target: /opt/decider/ro_config
read_only: true
db:
restart: unless-stopped
container_name: decider-db
env_file: .env
image: postgres:16-alpine
environment:
POSTGRES_INITDB_ARGS: '--auth=scram-sha-256'
POSTGRES_HOST_AUTH_METHOD: 'scram-sha-256'
POSTGRES_USER: ${DB_ADMIN_NAME}
PGUSER: ${DB_ADMIN_NAME}
POSTGRES_PASSWORD: ${DB_ADMIN_PASS}
POSTGRES_DB: ${DB_DATABASE}
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_ADMIN_NAME} -d ${DB_DATABASE}']
interval: 4s
timeout: 2s
retries: 8
volumes:
- db_data:/var/lib/postgresql/data
volumes:
db_data: