Skip to content

Commit

Permalink
final update
Browse files Browse the repository at this point in the history
  • Loading branch information
longshuicy committed Aug 19, 2024
1 parent 80e1a08 commit 9875368
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
env:
- name: BASE_URL_ROUTE
value: ""
ports:
- name: http
containerPort: 80
Expand Down
7 changes: 5 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ services:
auth_server_url: http://keycloak:8080/keycloak/
keycloak_base: http://localhost/api
frontend_url: http://localhost
# For deploy to subdirectory
BASE_URL_ROUTE: ${BASE_URL_ROUTE:-}
API_V2_STR: "/${BASE_URL_ROUTE}/api/v2"
depends_on:
- mongo
- minio-nginx
Expand All @@ -71,8 +74,8 @@ services:
- rabbitmq
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.routers.swagger.rule=PathPrefix(`/docs`)"
- "traefik.http.routers.backend.rule=PathPrefix(`${BASE_URL_ROUTE}/api`)"
- "traefik.http.routers.swagger.rule=PathPrefix(`${BASE_URL_ROUTE}/docs`)"
- "traefik.http.services.backend.loadbalancer.server.port=80"
- "traefik.http.routers.backend.priority=5"

Expand Down
5 changes: 5 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ ARG BASE_URL_ROUTE=""
ENV BASE_URL_ROUTE=${BASE_URL_ROUTE:-}
RUN echo "Build time BASE_URL_ROUTE: ${BASE_URL_ROUTE}"

# Add the build argument for CLOWDER_REMOTE_HOSTNAME to work with backend at a different host
ARG CLOWDER_REMOTE_HOSTNAME=""
ENV CLOWDER_REMOTE_HOSTNAME=${CLOWDER_REMOTE_HOSTNAME:-}
RUN echo "Build time CLOWDER_REMOTE_HOSTNAME: ${CLOWDER_REMOTE_HOSTNAME}"

# copy only package for caching purposes
COPY ["package.json", "package-lock.json*", "./"]
COPY tools/ /usr/src/app/tools/
Expand Down

0 comments on commit 9875368

Please sign in to comment.