Implement Docker support with Dockerfile, docker-compose, and nginx configuration; add HTTPS redirection option and update appsettings
This commit is contained in:
parent
17a561094a
commit
7a919491d2
7 changed files with 215 additions and 2 deletions
33
docker-compose.yml
Normal file
33
docker-compose.yml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
services:
|
||||
worktracker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: ${IMAGE_REGISTRY:-worktracker}:${IMAGE_TAG:-latest}
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: Production
|
||||
UseHttpsRedirection: "false"
|
||||
ConnectionStrings__DefaultConnection: Data Source=/app/Data/app.db;Cache=Shared
|
||||
MongoDb__ConnectionString: mongodb://mongo:27017
|
||||
ports:
|
||||
- "8002:8080"
|
||||
depends_on:
|
||||
- mongo
|
||||
volumes:
|
||||
- worktracker_data:/app/Data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:8080/ >/dev/null 2>&1 || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
mongo:
|
||||
image: mongo:7
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- mongo_data:/data/db
|
||||
|
||||
volumes:
|
||||
worktracker_data:
|
||||
mongo_data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue