[CHORE] Migrate to Helm (#4)
Co-authored-by: dunemask <dunemask@gmail.com> Reviewed-on: https://gitea.dunemask.net/elysium/khufu/pulls/4
This commit is contained in:
parent
d66c5011ff
commit
39a882cb18
14 changed files with 469 additions and 3 deletions
20
Dockerfile
20
Dockerfile
|
@ -1,10 +1,26 @@
|
|||
FROM node:16
|
||||
FROM node:16 as build
|
||||
WORKDIR /dunemask/net/khufu
|
||||
RUN apt-get update && apt-get install nginx gettext-base -y
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
RUN npm i
|
||||
COPY public public
|
||||
COPY src src
|
||||
ARG REACT_APP_CAIRO_URL
|
||||
ARG REACT_APP_NUBIAN_URL
|
||||
RUN npm run build:react
|
||||
COPY server server
|
||||
CMD ["npm", "start"]
|
||||
# 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"]
|
||||
|
|
Reference in a new issue