docker support

master
Tudor Stanciu 2020-12-26 02:27:53 +02:00
parent a134c36553
commit 85387c15fe
4 changed files with 37 additions and 0 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
.git
node_modules
build
__mocks__
.vscode
helm

2
.env.production Normal file
View File

@ -0,0 +1,2 @@
PUBLIC_URL=/network-resurrector/
REACT_APP_IDENTITY_AUTHENTICATION_URL=https://toodle.ddns.net/identity-server-api/identity/authenticate?UserName={username}&Password={password}

28
dockerfile Normal file
View File

@ -0,0 +1,28 @@
# build environment
FROM node:12 as builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . ./
RUN npm run build
# production environment
FROM node:12
RUN printf '\n\n- Copy application files\n'
ARG APP_SUBFOLDER=network-resurrector
COPY --from=builder /app/build ./application/${APP_SUBFOLDER}
COPY --from=builder /app/build/index.html ./application/
#install static server
RUN npm install -g serve
#set workdir to root
WORKDIR /
EXPOSE 80
CMD ["sh", "-c", "serve -s application -p 80"]

1
private/docker-notes.txt Normal file
View File

@ -0,0 +1 @@
#test