Skip to content

Commit

Permalink
cicd web-demo otp-react UI
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Oct 11, 2024
1 parent e242cfc commit 39481fb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
API_PATH: /otp/routers/openmove
API_PORT: 8080
DOCKER_IMAGE_OTP: ghcr.io/${{ github.repository }}/odh-mentor-otp
DOCKER_IMAGE_OTP_REACT: ghcr.io/${{ github.repository }}/odh-mentor-otp-react
DOCKER_IMAGE_JOURNEY: ghcr.io/${{ github.repository }}/odh-mentor-otp-journey
DOCKER_IMAGE_GBFS: ghcr.io/${{ github.repository }}/odh-mentor-otp-gbfs
DOCKER_IMAGE_GEOCODER: ghcr.io/${{ github.repository }}/odh-mentor-otp-geocoder
Expand Down Expand Up @@ -51,6 +52,7 @@ jobs:
env:
X_COMPOSE_PROJECT_NAME: ${{ env.PROJECT_NAME }}
X_DOCKER_IMAGE_OTP: ${{ env.DOCKER_IMAGE_OTP }}
X_DOCKER_IMAGE_OTP_REACT: ${{ env.DOCKER_IMAGE_OTP_REACT }}
X_DOCKER_IMAGE_JOURNEY: ${{ env.DOCKER_IMAGE_JOURNEY }}
X_DOCKER_IMAGE_GBFS: ${{ env.DOCKER_IMAGE_GBFS }}
X_DOCKER_IMAGE_GEOCODER: ${{ env.DOCKER_IMAGE_GEOCODER }}
Expand All @@ -64,6 +66,7 @@ jobs:

X_SERVER_PORT_OTP: 1080
X_SERVER_PORT_JOURNEY: 1081
X_SERVER_PORT_OTP_REACT: 1079
X_GBFS_HOST : "https://gbfs.otp.opendatahub.testingmachine.eu/"
X_DOCKER_GBFS_PORT: 1082
X_DOCKER_GEOCODER_PORT: 1083
Expand All @@ -74,7 +77,6 @@ jobs:
X_DOCKER_TRAFFIC_PORT: 1088
X_DOCKER_AMARILLO_PORT: 1092


X_JAVA_MX: "14G"

X_API_HOST: ${{ env.API_HOST }}
Expand Down
7 changes: 7 additions & 0 deletions infrastructure/docker-compose.run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ services:
ports:
- ${SERVER_PORT_JOURNEY}:80

otp-react:
image: ${DOCKER_IMAGE_OTP_REACT}:${DOCKER_TAG}
restart: unless-stopped
env_file:
- .env
ports:
- ${SERVER_PORT_OTP_REACT}:80

otp:
image: ${DOCKER_IMAGE_OTP}:${DOCKER_TAG}
Expand Down
19 changes: 19 additions & 0 deletions infrastructure/docker/otp-react/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:20.18.0-alpine AS build

WORKDIR /build
COPY ./web-demo .

RUN mkdir -p /run/nginx
RUN mkdir -p /var/www/html

# needed by yarn install for some reason
RUN apk add --no-cache git

RUN yarn install
RUN yarn build

FROM nginx:1.27.2-alpine
# be quiet
ENV NGINX_ENTRYPOINT_QUIET_LOGS=1
COPY --from=build /build/dist/* /usr/share/nginx/html

0 comments on commit 39481fb

Please sign in to comment.