Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBC22-1792:Switch to Alpine, remove build arg #297

Merged
merged 1 commit into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compose/caching/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.24
FROM nginx:stable-alpine


#COPY ./src/caching/nginx.conf /etc/nginx/nginx.conf
Expand Down
2 changes: 1 addition & 1 deletion compose/caching/entrypoint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

echo "Updating the proxy_pass in the nginx config based on the DRIVEBC_IMAGE_API_BASE_URL variable in the django configmap"

Expand Down
2 changes: 1 addition & 1 deletion compose/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ EXPOSE 3000
ARG DEBUG_BUILD=false

# Add debugging tools into builds if enabled
RUN if [ $DEBUG_BUILD = true ]; then \
RUN if [ ${DEBUG_BUILD} = true ]; then \
apt update && apt-get install -y jq vim procps less; \
fi

Expand Down
27 changes: 3 additions & 24 deletions compose/frontend/StaticBuild
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,9 @@ RUN chown node:root /app/node_modules
# home is /, so node can't create a cache dir
ENV HOME /home/node

ARG API_HOST
ENV REACT_APP_API_HOST=${API_HOST}
ARG BASE_MAP
ENV REACT_APP_BASE_MAP=${BASE_MAP}
ARG MAP_STYLE
ENV REACT_APP_MAP_STYLE=${MAP_STYLE}
ARG HIGHWAY_LAYER
ENV REACT_APP_HIGHWAY_LAYER=${HIGHWAY_LAYER}
ARG OPEN511_LAYER
ENV REACT_APP_OPEN511_LAYER=${OPEN511_LAYER}
ARG REPLAY_THE_DAY
ENV REACT_APP_REPLAY_THE_DAY=${REPLAY_THE_DAY}
ARG ROUTE_PLANNER
ENV REACT_APP_ROUTE_PLANNER=${ROUTE_PLANNER}
ARG ROUTE_PLANNER_KEY
ENV REACT_APP_ROUTE_PLANNER_KEY=${ROUTE_PLANNER_KEY}
ARG GEOCODER_HOST
ENV REACT_APP_GEOCODER_HOST=${GEOCODER_HOST}
ARG GEOCODER_API_AUTH_KEY
ENV REACT_APP_GEOCODER_API_AUTH_KEY=${GEOCODER_API_AUTH_KEY}

RUN npm run openshift_build

FROM nginx
FROM nginx:stable-alpine

EXPOSE 3000

Expand All @@ -55,8 +34,8 @@ RUN chmod -R 777 /run /var/log/nginx /var/cache/nginx /usr/share/nginx/html/stat
ARG DEBUG_BUILD=false

# Add debugging tools into builds if enabled
RUN if [ $DEBUG_BUILD = true ]; then \
apt update && apt-get install -y jq vim procps less; \
RUN if [ ${DEBUG_BUILD} = true ]; then \
apk update && apk add --no-cache jq vim procps less; \
fi

COPY ./compose/frontend/entrypoint /docker-entrypoint.d/add_client_env.sh
Expand Down
2 changes: 1 addition & 1 deletion compose/frontend/entrypoint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

MAIN=`find /usr/share/nginx/html/static/js/main.*.js`
echo -e "\nwindow.BASE_MAP='${REACT_APP_BASE_MAP}';" >> $MAIN
Expand Down
Loading