diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 604f796e..51488c1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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 }} @@ -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 @@ -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 }} diff --git a/infrastructure/docker-compose.run.yml b/infrastructure/docker-compose.run.yml index 02347e15..5bb91864 100644 --- a/infrastructure/docker-compose.run.yml +++ b/infrastructure/docker-compose.run.yml @@ -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} diff --git a/infrastructure/docker/otp-react/Dockerfile b/infrastructure/docker/otp-react/Dockerfile new file mode 100644 index 00000000..6f55201a --- /dev/null +++ b/infrastructure/docker/otp-react/Dockerfile @@ -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 +