services:
  adhan-webapp:
    build:
      context: ./adhan-webapp
    container_name: adhan-webapp
    ports:
      - '5090:80'
    restart: unless-stopped
    volumes:
      - ./adhan-webapp/settings.json:/app/settings.json
      - ./adhan-webapp/static:/app/static:ro
      - ./adhan-webapp/templates:/app/templates:ro
      - ./adhan-webapp/app.py:/app/app.py:ro
      - ./adhan-webapp/config.py:/app/config.py:ro
      - ./adhan-webapp/adhan_cron.py:/app/adhan_cron.py:ro
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    environment:
      - FLASK_ENV=production
      - FLASK_DEBUG=0
      - PYTHONUNBUFFERED=1
      - TZ=Europe/Amsterdam
    networks:
      - adhan-network

  sonos-api:
    container_name: sonos-api
    image: chrisns/docker-node-sonos-http-api
    network_mode: host
    restart: unless-stopped
    volumes:
      - ./sonos/settings.json:/app/settings.json:ro
      - ./sonos/presets:/app/presets:ro
      - ./sonos/cache:/app/cache:ro
      - ./sonos/clips:/app/static/clips:ro

networks:
  adhan-network:
    driver: bridge

version: '3.8'