networks: serverjars: driver: bridge services: traefik: image: traefik:v2.5 container_name: serverjars-traefik restart: unless-stopped command: - "--providers.docker=true" - "--entrypoints.web.address=:80" ports: - "80:80" volumes: - "/var/run/docker.sock:/var/run/docker.sock" networks: - serverjars web: image: ghcr.io/undeadjess/serverjars-web:production container_name: serverjars-web restart: unless-stopped environment: LISTEN_PORT: 3000 depends_on: - api labels: - "traefik.enable=true" - "traefik.http.routers.web.rule=PathPrefix(`/`)" - "traefik.http.services.web.loadbalancer.server.port=3000" networks: - serverjars api: image: ghcr.io/undeadjess/serverjars-api:production restart: unless-stopped container_name: serverjars-api environment: DB_HOST: db DB_USER: root DB_PASSWORD: ExamplePassword-PleaseChange DB_NAME: mcserverjars LISTEN_PORT: 3000 labels: - "traefik.enable=true" - "traefik.http.routers.api.rule=PathPrefix(`/api`)" - "traefik.http.services.api.loadbalancer.server.port=3000" networks: - serverjars watchtower: command: "serverjars-api serverjars-web --interval 30" image: containrrr/watchtower container_name: watchtower restart: unless-stopped volumes: - "/var/run/docker.sock:/var/run/docker.sock" networks: - serverjars