refactor(docker): use templating to handle env variables (#8878)
Refs #8877
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -8,19 +8,21 @@ RUN apk update && apk add --no-cache "nodejs>=18.14.1-r0 "
|
||||
|
||||
LABEL maintainer="fehguy"
|
||||
|
||||
ENV API_KEY "**None**"
|
||||
ENV SWAGGER_JSON "/app/swagger.json"
|
||||
ENV PORT 8080
|
||||
ENV BASE_URL ""
|
||||
ENV SWAGGER_JSON_URL ""
|
||||
ENV API_KEY="**None**" \
|
||||
SWAGGER_JSON="/app/swagger.json" \
|
||||
PORT="8080" \
|
||||
PORT_IPV6="" \
|
||||
BASE_URL="/" \
|
||||
SWAGGER_JSON_URL=""
|
||||
|
||||
COPY --chown=nginx:nginx --chmod=0666 ./docker/nginx.conf ./docker/cors.conf /etc/nginx/
|
||||
COPY --chown=nginx:nginx --chmod=0666 ./docker/default.conf.template ./docker/cors.conf /etc/nginx/templates/
|
||||
|
||||
# copy swagger files to the `/js` folder
|
||||
COPY --chmod=0666 ./dist/* /usr/share/nginx/html/
|
||||
COPY --chmod=0555 ./docker/docker-entrypoint.d/ /docker-entrypoint.d/
|
||||
COPY --chmod=0666 ./docker/configurator /usr/share/nginx/configurator
|
||||
|
||||
RUN chmod 777 /usr/share/nginx/html/ /etc/nginx/ /var/cache/nginx/ /var/run/
|
||||
# Simulates running NGINX as a non root; in future we want to use nginxinc/nginx-unprivileged.
|
||||
# In future we will have separate unpriviledged images tagged as v5.1.2-unprivileged.
|
||||
RUN chmod 777 /usr/share/nginx/html/ /etc/nginx/conf.d/ /etc/nginx/conf.d/default.conf /var/cache/nginx/ /var/run/
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
Reference in New Issue
Block a user