mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-21 22:08:48 +00:00
improved docker-compose examples
This commit is contained in:
parent
616e8fba5e
commit
70212e0edd
@ -69,10 +69,12 @@ Goto [`docker-compose.yml`](docker-compose.yml) for more advanced example (with
|
||||
version: '3.9'
|
||||
|
||||
x-dls-variables: &dls-variables
|
||||
TZ: Europe/Berlin # REQUIRED, set your timezone correctly on fastapi-dls AND YOUR CLIENTS !!!
|
||||
DLS_URL: localhost # REQUIRED, change to your ip or hostname
|
||||
DLS_PORT: 443
|
||||
LEASE_EXPIRE_DAYS: 90 # 90 days is maximum
|
||||
DATABASE: sqlite:////app/database/db.sqlite
|
||||
DEBUG: false
|
||||
|
||||
services:
|
||||
dls:
|
||||
|
@ -14,6 +14,7 @@ services:
|
||||
environment:
|
||||
<<: *dls-variables
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /opt/docker/fastapi-dls/cert:/app/cert # instance.private.pem, instance.public.pem
|
||||
- db:/app/database
|
||||
entrypoint: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--app-dir", "/app", "--proxy-headers"]
|
||||
@ -30,6 +31,7 @@ services:
|
||||
- "80:80" # for "/leasing/v1/lessor/shutdown" used by windows guests, can't be changed!
|
||||
- "443:443" # first part must match "DLS_PORT"
|
||||
volumes:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /opt/docker/fastapi-dls/cert:/opt/cert
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "--insecure", "--fail", "https://localhost/-/health"]
|
||||
|
Loading…
Reference in New Issue
Block a user