From df351d9f7bee0585f2964b6038961b17c55d0350 Mon Sep 17 00:00:00 2001 From: Cyril L'Orphelin <cyril.lorphelin@cc.in2p3.fr> Date: Wed, 5 Feb 2020 14:48:30 +0100 Subject: [PATCH] add nginx --- Dockerfile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d1ce688c..12e457a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,12 +38,23 @@ RUN npm cache clean -f RUN npm install -g n RUN n stable RUN curl -o- -L https://yarnpkg.com/install.sh | bash -ENV PATH "$PATH:$HOME/.yarn/bin" -RUN yarn install --ignore-engines -RUN yarn encore dev +RUN $HOME/.yarn/bin/yarn install --ignore-engines +RUN $HOME/.yarn/bin/yarn encore dev +## Add nginx -EXPOSE 8000/tcp -CMD symfony server:start +RUN apk add --update --no-cache nginx + +COPY nginx.conf /etc/nginx/ +COPY symfony.conf /etc/nginx/conf.d/ + +RUN echo "upstream php-upstream { server php:9001; }" > /etc/nginx/conf.d/upstream.conf + +RUN adduser -D -g '' -G www-data www-data + +CMD ["nginx"] + +EXPOSE 80 +EXPOSE 443 -- GitLab