mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-22 06:18: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'
|
version: '3.9'
|
||||||
|
|
||||||
x-dls-variables: &dls-variables
|
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_URL: localhost # REQUIRED, change to your ip or hostname
|
||||||
DLS_PORT: 443
|
DLS_PORT: 443
|
||||||
LEASE_EXPIRE_DAYS: 90 # 90 days is maximum
|
LEASE_EXPIRE_DAYS: 90 # 90 days is maximum
|
||||||
DATABASE: sqlite:////app/database/db.sqlite
|
DATABASE: sqlite:////app/database/db.sqlite
|
||||||
|
DEBUG: false
|
||||||
|
|
||||||
services:
|
services:
|
||||||
dls:
|
dls:
|
||||||
|
@ -14,6 +14,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
<<: *dls-variables
|
<<: *dls-variables
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /opt/docker/fastapi-dls/cert:/app/cert # instance.private.pem, instance.public.pem
|
- /opt/docker/fastapi-dls/cert:/app/cert # instance.private.pem, instance.public.pem
|
||||||
- db:/app/database
|
- db:/app/database
|
||||||
entrypoint: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--app-dir", "/app", "--proxy-headers"]
|
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!
|
- "80:80" # for "/leasing/v1/lessor/shutdown" used by windows guests, can't be changed!
|
||||||
- "443:443" # first part must match "DLS_PORT"
|
- "443:443" # first part must match "DLS_PORT"
|
||||||
volumes:
|
volumes:
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /opt/docker/fastapi-dls/cert:/opt/cert
|
- /opt/docker/fastapi-dls/cert:/opt/cert
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "--insecure", "--fail", "https://localhost/-/health"]
|
test: ["CMD", "curl", "--insecure", "--fail", "https://localhost/-/health"]
|
||||||
|
Loading…
Reference in New Issue
Block a user