diff --git a/docker-compose.yml b/docker-compose.yml index cb3127d..957ffe1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: # docker build -t git.plexultra.com/dlawler489/printhive:latest . image: git.plexultra.com/dlawler489/printhive:latest pull_policy: always + container_name: printhive-app # stable name for the Traefik file-provider to target depends_on: db: condition: service_healthy @@ -34,11 +35,11 @@ services: - uploads:/app/uploads - thumbnails:/app/thumbnails - glb:/app/glb - # Host port is only for Traefik to reach the app; set APP_PORT to any free - # port (3000 was already taken on the host). If Traefik shares the Docker - # network and routes by container, you can drop this whole `ports:` block. - ports: - - "${APP_PORT:-3000}:3000" + # No host port published — Traefik reaches the app over the shared network + # at http://printhive-app:3000 (configure that in your Traefik file provider). + networks: + - default # talk to the db + - traefik # reachable by Traefik restart: unless-stopped # Traefik (if using labels rather than your file provider): # labels: @@ -53,3 +54,11 @@ volumes: uploads: thumbnails: glb: + +networks: + default: + # The existing Traefik network (same one your other services use). + # Set TRAEFIK_NETWORK in Dockhand to its exact name. + traefik: + external: true + name: ${TRAEFIK_NETWORK:-traefik}