70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
version: "3.9"
|
|
|
|
services:
|
|
solardb-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.api
|
|
image: solardb-api:latest
|
|
container_name: solardb-api
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# nginx-proxy labels (env) for routing + certs
|
|
VIRTUAL_HOST: ${SOLARDB_API_HOST}
|
|
LETSENCRYPT_HOST: ${SOLARDB_API_HOST}
|
|
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
# Flask/TinyDB
|
|
FLASK_ENV: ${FLASK_ENV:-production}
|
|
DB_PATH: /data/db.json
|
|
volumes:
|
|
- solardb_data:/data
|
|
expose:
|
|
- "5001"
|
|
networks:
|
|
- reverse-proxy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:5001/healthz"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
solardb-ui:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.ui
|
|
image: solardb-ui:latest
|
|
container_name: solardb-ui
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
VIRTUAL_HOST: ${SOLARDB_UI_HOST}
|
|
LETSENCRYPT_HOST: ${SOLARDB_UI_HOST}
|
|
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL}
|
|
# Point your UI to the API public URL (https)
|
|
API_BASE_URL: https://${SOLARDB_API_HOST}
|
|
# If your entry file differs, uncomment and set it:
|
|
# FLET_ENTRY: client/main.py
|
|
volumes:
|
|
- solardb_uploads:/app/uploads
|
|
expose:
|
|
- "5000"
|
|
depends_on:
|
|
- solardb-api
|
|
networks:
|
|
- reverse-proxy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:5000/"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
solardb_data:
|
|
solardb_uploads:
|
|
|
|
networks:
|
|
reverse-proxy:
|
|
external: true |