To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 920c29cc authored by Sandro Lutz's avatar Sandro Lutz Committed by lic
Browse files

Change docker image to nginx

parent 658eaf3c
......@@ -19,23 +19,10 @@ RUN npm run build
# Second stage: Server to deliver files
FROM node:alpine
# Install http server
RUN npm install --global --no-save http-server
# Port 8080 can be used as non root
EXPOSE 8080
# Create user with home directory and no password
RUN adduser -Dh /public server
USER server
WORKDIR /public
FROM nginx:1.15-alpine
# Copy files from first stage
COPY --from=build /dist /public
# Serve index.html for every file which is not found on the server
RUN cp ./index.html ./404.html
COPY --from=build /dist /var/www
# Run server (-g will automatically serve the gzipped files if possible)
CMD ["/usr/local/bin/http-server", "-g", "/public"]
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/;
index index.html;
try_files $uri /index.html =404;
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment