mirror of
https://codeberg.org/pluja/kycnot.me
synced 2025-01-14 16:37:06 -05:00
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
volumes:
|
|
database:
|
|
|
|
services:
|
|
database:
|
|
image: mariadb:11
|
|
restart: unless-stopped
|
|
container_name: kycnot-database
|
|
environment:
|
|
MARIADB_USER: ${MARIADB_USER:-kycnot}
|
|
MARIADB_PASSWORD: ${MARIADB_PASSWORD:-kycnot}
|
|
MARIADB_DATABASE: ${MARIADB_DATABASE:-kycnot}
|
|
MARIADB_RANDOM_ROOT_PASSWORD: 1
|
|
volumes:
|
|
- database:/var/lib/mysql:Z
|
|
- ./docker/database/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
healthcheck:
|
|
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
|
start_period: 10s
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
app:
|
|
build:
|
|
context: ./src
|
|
restart: unless-stopped
|
|
container_name: kycnot-app
|
|
depends_on:
|
|
database:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URI: "${MARIADB_USER:-kycnot}:${MARIADB_PASSWORD:-kycnot}@tcp(database:3306)/${MARIADB_DATABASE:-kycnot}?parseTime=True"
|
|
SECRET_TOKEN: "${SECRET_TOKEN}"
|
|
OPENAI_API_KEY: "${OPENAI_API_KEY}"
|
|
ROOT_DIR: "/app"
|
|
env_file: .env
|
|
volumes:
|
|
- ./src/frontend/static/images:/app/frontend/static/images
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"curl -k -s http://localhost:1337 | grep -i '<title>KYCNOT.ME</title>' || exit 1",
|
|
]
|
|
start_period: 10s
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|