Build private multi-hotel web foundation with MongoDB, Gmail import and Linux deployment
This commit is contained in:
+61
@@ -0,0 +1,61 @@
|
||||
name: guestops
|
||||
x-app-env: &app-env
|
||||
Mongo__ConnectionString: mongodb://guestops:${MONGO_APP_PASSWORD:?Set MONGO_APP_PASSWORD}@mongo:27017/guestops?authSource=guestops
|
||||
Mongo__Database: guestops
|
||||
Keys__Path: /var/lib/guestops/keys
|
||||
PublicUrl: https://sandbox-guestops.futuresens.co.uk
|
||||
Google__ClientId: ${GOOGLE_CLIENT_ID:-}
|
||||
Google__ClientSecret: ${GOOGLE_CLIENT_SECRET:-}
|
||||
Logging__LogLevel__Default: Warning
|
||||
Logging__LogLevel__Microsoft.AspNetCore.Hosting.Diagnostics: Warning
|
||||
x-logging: &logging
|
||||
driver: json-file
|
||||
options: { max-size: "10m", max-file: "3" }
|
||||
services:
|
||||
api:
|
||||
image: ${GUESTOPS_API_IMAGE:-guestops-api:local}
|
||||
build: { context: ., target: api }
|
||||
restart: unless-stopped
|
||||
ports: ["127.0.0.1:8080:8080"]
|
||||
environment:
|
||||
<<: *app-env
|
||||
ASPNETCORE_ENVIRONMENT: Production
|
||||
AllowedHosts: sandbox-guestops.futuresens.co.uk;localhost
|
||||
volumes: ["app-keys:/var/lib/guestops/keys"]
|
||||
depends_on:
|
||||
mongo: { condition: service_healthy }
|
||||
logging: *logging
|
||||
mem_limit: 1g
|
||||
security_opt: ["no-new-privileges:true"]
|
||||
worker:
|
||||
image: ${GUESTOPS_WORKER_IMAGE:-guestops-worker:local}
|
||||
build: { context: ., target: worker }
|
||||
restart: unless-stopped
|
||||
environment: *app-env
|
||||
volumes: ["app-keys:/var/lib/guestops/keys"]
|
||||
depends_on:
|
||||
mongo: { condition: service_healthy }
|
||||
logging: *logging
|
||||
mem_limit: 768m
|
||||
security_opt: ["no-new-privileges:true"]
|
||||
mongo:
|
||||
image: mongo:8.0
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MONGO_INITDB_ROOT_USERNAME: admin
|
||||
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD:?Set MONGO_ROOT_PASSWORD}
|
||||
MONGO_APP_PASSWORD: ${MONGO_APP_PASSWORD:?Set MONGO_APP_PASSWORD}
|
||||
volumes:
|
||||
- mongo-data:/data/db
|
||||
- ./deploy/mongo-init.js:/docker-entrypoint-initdb.d/guestops.js:ro
|
||||
command: ["mongod", "--wiredTigerCacheSizeGB", "1"]
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "mongosh --quiet --eval 'db.adminCommand({ping:1}).ok' | grep 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
logging: *logging
|
||||
mem_limit: 2500m
|
||||
volumes:
|
||||
mongo-data:
|
||||
app-keys:
|
||||
Reference in New Issue
Block a user