version: '3.8'

services:
  pixelbrew:
    build: . # Das Image wird beim Start aus dem lokalen Dockerfile gebaut
    container_name: pixelbrew
    restart: unless-stopped
    environment:
      - NODE_ENV=production
      - ADMIN_USERNAME=${ADMIN_USERNAME}
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.pixelbrew.rule=Host(`pixelbrew.de`)"
      - "traefik.http.routers.pixelbrew.entrypoints=websecure"
      - "traefik.http.routers.pixelbrew.tls=true"
      - "traefik.http.services.pixelbrew.loadbalancer.server.port=3000"
    networks:
      - traefik
    expose:
      - "3000"

networks:
  traefik:
    external: true
