Configure flexible deployment with environment variables
- Change Flask port from 8080 to 5000 for consistency - Add environment-based network mode configuration (bridge/host) - Support both Windows Docker Desktop and Linux LXC deployments - Remove obsolete docker-compose version and conflicting network settings - Add .env.example with platform-specific configuration guidance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
20
.env.example
Normal file
20
.env.example
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# WOL Manager Environment Configuration
|
||||||
|
|
||||||
|
# Network mode configuration
|
||||||
|
# For Windows/macOS Docker Desktop: use "bridge"
|
||||||
|
# For Linux/LXC/Proxmox: use "host" for guaranteed WOL functionality
|
||||||
|
WOL_NETWORK_MODE=bridge
|
||||||
|
|
||||||
|
# External port mapping (only used with bridge mode)
|
||||||
|
# For Windows/macOS: set the external port you want to access
|
||||||
|
# For Linux with host mode: this setting is ignored
|
||||||
|
WOL_EXTERNAL_PORT=5000
|
||||||
|
|
||||||
|
# Examples:
|
||||||
|
# Windows Docker Desktop:
|
||||||
|
# WOL_NETWORK_MODE=bridge
|
||||||
|
# WOL_EXTERNAL_PORT=5000
|
||||||
|
|
||||||
|
# Linux LXC/Proxmox:
|
||||||
|
# WOL_NETWORK_MODE=host
|
||||||
|
# WOL_EXTERNAL_PORT=5000 # ignored in host mode
|
||||||
@@ -197,4 +197,4 @@ def scan_network():
|
|||||||
return jsonify(result)
|
return jsonify(result)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host='0.0.0.0', port=8080, debug=False)
|
app.run(host='0.0.0.0', port=5000, debug=False)
|
||||||
@@ -1,25 +1,16 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
wol-web:
|
wol-web:
|
||||||
build: .
|
build: .
|
||||||
container_name: wol-manager
|
container_name: wol-manager
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8088:8080"
|
- "${WOL_EXTERNAL_PORT:-5000}:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./data:/data
|
||||||
networks:
|
|
||||||
- wol-network
|
|
||||||
environment:
|
environment:
|
||||||
- PYTHONUNBUFFERED=1
|
- PYTHONUNBUFFERED=1
|
||||||
# Necesare pentru Wake-on-LAN
|
network_mode: "${WOL_NETWORK_MODE:-bridge}"
|
||||||
network_mode: host
|
|
||||||
privileged: true
|
privileged: true
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
- NET_RAW
|
- NET_RAW
|
||||||
|
|
||||||
networks:
|
|
||||||
wol-network:
|
|
||||||
driver: bridge
|
|
||||||
Reference in New Issue
Block a user