services: web: image: sheep-service/web build: ./web restart: always expose: - "4002" volumes: - "${DATA_PATH:-./data}:/app/data" environment: - TZ=${TZ} - CARDS_PATH=/app/data/cards/ - MAP_PATH=/app/data/map/ networks: - network api: image: sheep-service/api build: ./api restart: always expose: - "4003" volumes: - "${DATA_PATH:-./data}:/app/data" environment: - TZ=${TZ} - DATABASE_PATH=/app/data/ - CARDS_PATH=/app/data/cards/ - PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium - VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY} - VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY} - DOMAIN=${DOMAIN} - ADMIN_TOKEN=${ADMIN_TOKEN} shm_size: '1gb' networks: - network depends_on: - metrics ws: image: sheep-service/ws build: ./ws restart: always expose: - "4004" volumes: - "${DATA_PATH:-./data}:/app/data" environment: - TZ=${TZ} - DATABASE_PATH=/app/data/ networks: - network metrics: image: sheep-service/metrics build: ./metrics ports: - "4005:4005" # HTTP push - "4006:4006" # WebSocket networks: - network depends_on: - pushgateway pushgateway: image: prom/pushgateway ports: - "4007:9091" networks: - network prometheus: image: prom/prometheus volumes: - "${DATA_PATH:-./data}/prometheus.yml:/etc/prometheus/prometheus.yml" ports: - "4008:9090" networks: - network depends_on: - pushgateway command: - "--config.file=/etc/prometheus/prometheus.yml" - "--storage.tsdb.path=/prometheus" - "--storage.tsdb.retention.time=7d" grafana: image: grafana/grafana ports: - "4009:3000" networks: - network depends_on: - prometheus environment: - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s/grafana/ - GF_SECURITY_ADMIN_USER=${ADMIN_USER} - GF_SECURITY_ADMIN_PASSWORD=${ADMIN_TOKEN} volumes: - ${DATA_PATH:-./data}/grafana:/var/lib/grafana nginx: image: nginx:latest restart: always ports: - "${HTTP_PORT}:80" - "${HTTPS_PORT}:443" volumes: - ./nginx/default.conf.template:/etc/nginx/templates/default.conf.template:ro - ./nginx/certs:/etc/letsencrypt/live - ./nginx/html:/usr/share/nginx/html - ./nginx/log:/var/log/nginx environment: - TZ=${TZ} - DOMAIN=${DOMAIN} command: /bin/sh -c "envsubst '\$DOMAIN' < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" networks: - network depends_on: - grafana cron: image: sheep-service/cron build: ./cron restart: always volumes: - "${DATA_PATH:-./data}:/app/data" environment: - TZ=${TZ} - DATABASE_PATH=/app/data/ - TELEGRAM_TOKEN=${TELEGRAM_TOKEN} - CHAT_ID=${CHAT_ID} networks: - network volumes: data: networks: network: driver: bridge