Skip to content

Commit

Permalink
Merge pull request #3 from CityConnect-TQS/CC-333-Switch-from-subdoma…
Browse files Browse the repository at this point in the history
…ins-to-paths

CC-333 Switch from subdomains to paths
  • Loading branch information
falcaodiogo authored May 24, 2024
2 parents 559a7c2 + d285006 commit a646712
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ on:
push:
branches:
- main
- CC-321-Deploy-to-virtual-machine # Only for testing
workflow_dispatch:

concurrency:
Expand Down
20 changes: 7 additions & 13 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ services:
- maven_data:/root/.m2
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=Host(`api.${HOST_URL:-localhost}`)
- traefik.http.routers.backend.rule=PathPrefix(`/api`)
- traefik.http.services.backend.loadbalancer.server.port=8080
- traefik.http.routers.backend.entrypoints=web

Expand All @@ -71,14 +71,12 @@ services:
- bun_cache:/root/.bun/install/cache
networks:
- frontend
environment:
- VITE_HOST_URL=${HOST_URL:-localhost}
labels:
- traefik.enable=true
- traefik.http.routers.client-portal.rule=Host(`${HOST_URL:-localhost}`)
- traefik.http.routers.client-portal.rule=PathPrefix(`/`)
- traefik.http.services.client-portal.loadbalancer.server.port=5173
- traefik.http.routers.client-portal.entrypoints=web

staff-portal:
depends_on:
backend:
Expand All @@ -93,12 +91,10 @@ services:
- bun_cache:/root/.bun/install/cache
networks:
- frontend
environment:
- VITE_HOST_URL=${HOST_URL:-localhost}
labels:
- traefik.enable=true
- traefik.http.routers.staff-portal.rule=Host(`staff.${HOST_URL:-localhost}`)
- traefik.http.services.staff-portal.loadbalancer.server.port=5173
- traefik.http.routers.staff-portal.rule=PathPrefix(`/staff`)
- traefik.http.services.staff-portal.loadbalancer.server.port=80
- traefik.http.routers.staff-portal.entrypoints=web

digital-signage:
Expand All @@ -115,12 +111,10 @@ services:
- bun_cache:/root/.bun/install/cache
networks:
- frontend
environment:
- VITE_HOST_URL=${HOST_URL:-localhost}
labels:
- traefik.enable=true
- traefik.http.routers.digital-signage.rule=Host(`digital.${HOST_URL:-localhost}`)
- traefik.http.services.digital-signage.loadbalancer.server.port=5173
- traefik.http.routers.digital-signage.rule=PathPrefix(`/digital`)
- traefik.http.services.digital-signage.loadbalancer.server.port=80
- traefik.http.routers.digital-signage.entrypoints=web

traefik:
Expand Down
10 changes: 5 additions & 5 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ services:
- maven_data:/root/.m2
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=Host(`api.localhost`)
- traefik.http.routers.backend.rule=PathPrefix(`/api`)
- traefik.http.services.backend.loadbalancer.server.port=8080
- traefik.http.routers.backend.entrypoints=web

Expand All @@ -75,10 +75,10 @@ services:
- VITE_HOST_URL=localhost
labels:
- traefik.enable=true
- traefik.http.routers.client-portal.rule=Host(`localhost`)
- traefik.http.routers.client-portal.rule=PathPrefix(`/`)
- traefik.http.services.client-portal.loadbalancer.server.port=5173
- traefik.http.routers.client-portal.entrypoints=web

staff-portal:
depends_on:
backend:
Expand All @@ -96,7 +96,7 @@ services:
- VITE_HOST_URL=localhost
labels:
- traefik.enable=true
- traefik.http.routers.staff-portal.rule=Host(`staff.localhost`)
- traefik.http.routers.staff-portal.rule=PathPrefix(`/staff`)
- traefik.http.services.staff-portal.loadbalancer.server.port=5173
- traefik.http.routers.staff-portal.entrypoints=web

Expand All @@ -117,7 +117,7 @@ services:
- VITE_HOST_URL=localhost
labels:
- traefik.enable=true
- traefik.http.routers.digital-signage.rule=Host(`digital.localhost`)
- traefik.http.routers.digital-signage.rule=PathPrefix(`/digital`)
- traefik.http.services.digital-signage.loadbalancer.server.port=5173
- traefik.http.routers.digital-signage.entrypoints=web

Expand Down

0 comments on commit a646712

Please sign in to comment.