31 lines
No EOL
691 B
Docker
Executable file
31 lines
No EOL
691 B
Docker
Executable file
# syntax=docker/dockerfile:1
|
|
|
|
FROM node:20-alpine
|
|
LABEL maintainer="marco@zervo.org"
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
RUN npm ci
|
|
RUN npm run build
|
|
|
|
RUN apk add nginx && \
|
|
mkdir -p /run/nginx && \
|
|
touch /run/nginx/nginx.pid && \
|
|
adduser -D -g 'www' www && \
|
|
mkdir /www && \
|
|
chown -R www:www /var/lib/nginx /www && \
|
|
chown -R www:www /www
|
|
|
|
COPY nginx/nginx.conf /etc/nginx/nginx.conf
|
|
COPY nginx/proxy.conf /etc/nginx/proxy.conf
|
|
COPY nginx/mime.types /etc/nginx/mime.types
|
|
|
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
|
RUN chmod +x /docker-entrypoint.sh
|
|
|
|
RUN cp -r ./dist/* /www && rm -r ./*
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
CMD ["nginx", "-g", "daemon off;"]
|
|
|
|
EXPOSE 3123 |