Skip to content

Commit

Permalink
changed to using expose rather than ports to not expose to the world
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 9, 2024
1 parent 4adc65a commit 5c363e9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
name: webclient
env:
- name: TILESERVER_URL
value: http://maps-svc.navigatum.svc.cluster.local:3001
value: http://maps-svc.navigatum.svc.cluster.local:8080
- name: CDN_URL
value: http://cdn-svc.navigatum.svc.cluster.local:3002
- name: MAIN_API_URL
Expand Down
2 changes: 1 addition & 1 deletion deployment/k3s/templates/networking/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
match: Host(`{{ $.Values.url }}`) && PathPrefix(`/maps/`)
services:
- name: maps-svc
port: 3001
port: 8080
middlewares:
- name: stripprefix
- name: cache-2-months
Expand Down
2 changes: 1 addition & 1 deletion deployment/k3s/templates/networking/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
app.kubernetes.io/name: maps
ports:
- name: http
port: 3001
port: 8080
targetPort: 8080
- name: src
port: 7771
Expand Down
28 changes: 15 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ services:
labels:
- "traefik.enable=true"
- "traefik.http.routers.navigatum.rule=Host(`nav.tum.de`)"
ports:
- "127.0.0.1:3000:3000"
expose:
- "3000"
environment:
TILESERVER_URL: http://tileserver:3001
TILESERVER_URL: http://tileserver:8080
CDN_URL: http://data:3002
MAIN_API_URL: http://main-api:3003
FEEDBACK_API_URL: http://feedback-api:3004
Expand Down Expand Up @@ -64,8 +64,8 @@ services:
volumes:
- tileserver-src:/data/:ro
read_only: true
ports:
- "127.0.0.1:3001:8080"
expose:
- "8080"
depends_on:
tileserver-init-config:
condition: service_completed_successfully
Expand All @@ -79,8 +79,8 @@ services:
- "traefik.enable=true"
- "traefik.http.routers.navigatum.rule=Host(`nav.tum.de`) && PathPrefix(`/cdn/`)"
build: ./data
ports:
- "127.0.0.1:3002:3002"
expose:
- "3002"
# server
main-api:
image: ghcr.io/tum-dev/navigatum-server:main
Expand All @@ -90,8 +90,8 @@ services:
- "traefik.http.routers.navigatum.rule=Host(`nav.tum.de`) && PathPrefix(`/api/`)"
build: ./server
command: /bin/navigatum-main-api
ports:
- "127.0.0.1:3003:3003"
expose:
- "3003"
volumes:
- type: tmpfs
target: /home/navigatum/.cache
Expand All @@ -115,6 +115,8 @@ services:
meilisearch:
image: getmeili/meilisearch:v1.6.2
restart: always
expose:
- "7700"
healthcheck:
test: wget -q --spider http://localhost:7700/health
retries: 5
Expand All @@ -128,8 +130,8 @@ services:
- "traefik.http.routers.navigatum.rule=Host(`nav.tum.de`) && PathPrefix(`/api/feedback`)"
build: ./server
command: /bin/navigatum-feedback
ports:
- "127.0.0.1:3004:3004"
expose:
- "3004"
healthcheck:
test: wget -q --spider http://localhost:3004/api/feedback/status
retries: 5
Expand All @@ -144,8 +146,8 @@ services:
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
expose:
- "5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
retries: 5
Expand Down

0 comments on commit 5c363e9

Please sign in to comment.