This repository has been archived on 2024-08-10. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
khufu/Dockerfile

27 lines
882 B
Text
Raw Normal View History

FROM node:16 as build
2021-11-06 20:11:52 -06:00
WORKDIR /dunemask/net/khufu
RUN apt-get update && apt-get install nginx gettext-base -y
2021-08-06 19:56:59 -06:00
COPY package.json .
COPY package-lock.json .
2021-11-06 20:11:52 -06:00
RUN npm i
COPY public public
COPY src src
2021-11-13 23:05:49 -07:00
ARG REACT_APP_CAIRO_URL
ARG REACT_APP_NUBIAN_URL
2021-11-06 20:11:52 -06:00
RUN npm run build:react
2021-08-06 19:56:59 -06:00
COPY server server
# Nginx Setup
WORKDIR /var/www/html
RUN rm -Rf ./*
# Move build nginx and update permissions
RUN cp -R /dunemask/net/khufu/build/* .
# Setup Nginx Config
RUN mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.old
COPY nginx/nginx.conf /etc/nginx/template.nginx.conf
RUN envsubst '${REACT_APP_CAIRO_URL},${REACT_APP_NUBIAN_URL}' < /etc/nginx/template.nginx.conf > /etc/nginx/nginx.conf
RUN chown -R www-data:www-data /var/www/html
# Containers run nginx with global directives and daemon off
WORKDIR /dunemask/net/khufu
#ENTRYPOINT ["nginx", "-g", "daemon off;"]
ENTRYPOINT ["npm", "run", "start"]