36 lines
1020 B
YAML
36 lines
1020 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
unifi-access-airbnb:
|
|
build: .
|
|
container_name: unifi-access-airbnb
|
|
restart: unless-stopped
|
|
volumes:
|
|
# Mount config file (edit this on host)
|
|
- ./unifi.conf:/app/unifi.conf:ro
|
|
# Mount logs directory for persistence
|
|
- ./logs:/app/logs
|
|
environment:
|
|
- TZ=America/New_York # Set your timezone
|
|
# Resource limits for Raspberry Pi compatibility
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128M
|
|
reservations:
|
|
memory: 64M
|
|
# Run every 6 hours by default
|
|
command: sh -c "while true; do python main.py; sleep 21600; done"
|
|
|
|
# Alternative: Run once and exit (for cron-like usage)
|
|
unifi-access-airbnb-once:
|
|
build: .
|
|
container_name: unifi-access-airbnb-once
|
|
profiles:
|
|
- manual # Only start with: docker-compose --profile manual up
|
|
volumes:
|
|
- ./unifi.conf:/app/unifi.conf:ro
|
|
- ./logs:/app/logs
|
|
environment:
|
|
- TZ=America/New_York
|
|
command: python main.py -v |