SHA256
Deploy configuration
- Added tasks for publishing as container image. - Improvements for deployment: Db migrations on startup, reverse-proxy forward headers, and DataProtect management. - Added deploy example using docker-compose.
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
services:
|
||||
database:
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-SomniaGuestLog}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-NotAStrongPassword}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-somnia}
|
||||
healthcheck:
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
test:
|
||||
- CMD
|
||||
- pg_isready
|
||||
timeout: 5s
|
||||
image: postgres:18-alpine
|
||||
volumes:
|
||||
- somniaguestlog_database_data:/var/lib/postgresql:rw
|
||||
somnia-guestlog:
|
||||
depends_on:
|
||||
- database
|
||||
environment:
|
||||
SOMNIA_ConnectionStrings__DbSomniaGuestLog: Host=database;Port=5432;Username=${POSTGRES_USER:-somnia};Password=${POSTGRES_PASSWORD:-NotAStrongPassword};Database=${POSTGRES_DB:-SomniaGuestLog}
|
||||
# Configure path for data protection keys. This path must persists between container restarts (use a mount or a volume).
|
||||
SOMNIA_DataProtectionDir: /SomniaGuestLog/dataprotection
|
||||
ASPNETCORE_URLS: "http://+:8080"
|
||||
# Somnia AddressQuery Service - START
|
||||
SOMNIA_AddressQuery__Provider: "Nominatim"
|
||||
# Override if required.
|
||||
# SOMNIA_AddressQuery__ServiceURL: ""
|
||||
# SOMNIA_AddressQuery__ApiKey: ""
|
||||
SOMNIA_AddressQuery__UserAgent: Somnia-GuestLog-Dev-Container
|
||||
SOMNIA_AddressQuery__ResultLang: es
|
||||
# Somnia AddressQuery Service - END
|
||||
SOMNIA_StayExport__ExportStorageConnectionString: disk://path=/SomniaGuestLog/StayExportFiles
|
||||
# Somnia StayExport - SpainParteViajeros Provider - START
|
||||
# Override vars if required
|
||||
# SOMNIA_StayExportSpainParteViajeros__InternetAvailable: true
|
||||
# SOMNIA_StayExportSpainParteViajeros__CodigoEstablecimiento: 123123123
|
||||
# Somnia StayExport - SpainParteViajeros Provider - END
|
||||
|
||||
# Enable for HTTPS - START
|
||||
# ASPNETCORE_URLS: "https://+:8090;http://+:8080"
|
||||
# ASPNETCORE_HTTPS_PORTS: 8090
|
||||
# ASPNETCORE_Kestrel__Certificates__Default__Password: ${CERTIFICATE_CREDENTIAL:-}
|
||||
# ASPNETCORE_Kestrel__Certificates__Default__Path: /https/aspnetapp.pfx
|
||||
# Enable for HTTPS - END
|
||||
|
||||
image: localhost/somnia-guestlog:latest
|
||||
# image: gitea.uberelectronnetwork.cc/somnia/somnia-guestlog:devbuild
|
||||
|
||||
ports:
|
||||
- protocol: tcp
|
||||
published: 8080
|
||||
target: 8080
|
||||
# Enable for HTTPS
|
||||
# - protocol: tcp
|
||||
# published: 8090
|
||||
# target: 8090
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- somniaguestlog_app_data:/SomniaGuestLog
|
||||
# Enable for HTTPS and configure path to your certificate.
|
||||
# - ${HOME}/.aspnet/https:/https/
|
||||
|
||||
volumes:
|
||||
somniaguestlog_database_data: Null
|
||||
somniaguestlog_app_data: Null
|
||||
Reference in New Issue
Block a user