printshopcreator/.docker/images/nginx/Dockerfile
2022-12-28 19:28:50 +01:00

15 lines
460 B
Docker

ARG NGINX_VERSION
FROM nginx:${NGINX_VERSION} as base
COPY --chown=nginx:nginx ./.docker/images/nginx/conf.d/default.conf /etc/nginx/conf.d
ARG APP_CODE_PATH
RUN sed -i "s#__NGINX_ROOT_NEW;#$APP_CODE_PATH/new/web;#" /etc/nginx/conf.d/default.conf
RUN sed -i "s#__NGINX_ROOT_OLD;#$APP_CODE_PATH/old/public;#" /etc/nginx/conf.d/default.conf
FROM base as prod
COPY ./src/old/public /data/www/old/public
COPY ./src/new/web /data/www/new/web
FROM base as local