starting to be usable.
This commit is contained in:
@ -2,18 +2,34 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
node-monitor:
|
||||
build: .
|
||||
image: node-monitor:latest
|
||||
container_name: node-monitor-app
|
||||
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
||||
# Mount the 'data' directory for RRD files.
|
||||
# The left side './data' refers to a 'data' directory in the same location
|
||||
# as this docker-compose.yml file.
|
||||
# For Podman, if you encounter SELinux issues, you might need to append ':Z' or ':z'
|
||||
# to the host path, e.g., './data:/data:Z'
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ../data:/data:Z
|
||||
|
||||
# Environment variables for the application
|
||||
environment:
|
||||
- DATA_DIR=/data
|
||||
- SERVICE_UUID=${SERVICE_UUID:-auto-generated}
|
||||
# Set a fixed SERVICE_UUID here. Replace this with your desired UUID.
|
||||
# This UUID will be used by the FastAPI app and passed to the frontend.
|
||||
SERVICE_UUID: "ab73d00a-8169-46bb-997d-f13e5f760973"
|
||||
DATA_DIR: "/data" # Inform the application where its data volume is mounted
|
||||
|
||||
# Restart the container if it stops for any reason, unless explicitly stopped
|
||||
restart: unless-stopped
|
||||
|
||||
# Healthcheck to ensure the container is running and responsive
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
retries: 3
|
||||
|
Reference in New Issue
Block a user