39 lines
1.2 KiB
YAML
Executable File
39 lines
1.2 KiB
YAML
Executable File
version: '3'
|
|
|
|
services:
|
|
backend:
|
|
build: .
|
|
container_name: myp-backend
|
|
networks:
|
|
backend_network:
|
|
ipv4_address: 192.168.0.5
|
|
environment:
|
|
- SECRET_KEY=${SECRET_KEY:-7445630171969DFAC92C53CEC92E67A9CB2E00B3CB2F}
|
|
- DATABASE_PATH=${DATABASE_PATH:-instance/myp.db}
|
|
- TAPO_USERNAME=${TAPO_USERNAME:-till.tomczak@mercedes-benz.com}
|
|
- TAPO_PASSWORD=${TAPO_PASSWORD:-744563017196A}
|
|
- "PRINTERS=${PRINTERS:-{\"Printer 1\": {\"ip\": \"192.168.0.100\"}, \"Printer 2\": {\"ip\": \"192.168.0.101\"}, \"Printer 3\": {\"ip\": \"192.168.0.102\"}, \"Printer 4\": {\"ip\": \"192.168.0.103\"}, \"Printer 5\": {\"ip\": \"192.168.0.104\"}, \"Printer 6\": {\"ip\": \"192.168.0.106\"}}}"
|
|
- FLASK_APP=app.py
|
|
- PYTHONUNBUFFERED=1
|
|
- HOST=0.0.0.0
|
|
- PORT=5000
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./instance:/app/instance
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--spider", "http://localhost:5000/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
networks:
|
|
backend_network:
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 192.168.0.0/24
|
|
gateway: 192.168.0.1 |