creates kubernetes friendly deployment

This commit is contained in:
Robert Koch
2023-10-12 11:07:11 +11:00
parent 1ed1c9ea1d
commit b42153bcc4
10 changed files with 46 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
FROM node:14.15.0 as build
FROM node:16-alpine as build
USER root
@@ -7,11 +7,18 @@ WORKDIR /app
# Install dependencies
COPY package*.json ./
COPY lerna.json ./
COPY pnpm-lock.yaml ./
COPY pnpm-workspace.yaml ./
COPY ./packages/webapp/package*.json /app/packages/webapp/
RUN npm install
RUN npm run bootstrap
RUN apk update
RUN apk add python3 build-base chromium
ENV PYTHON=/usr/bin/python3
RUN npm install -g pnpm
RUN pnpm install
# RUN npm run bootstrap
# Build webapp package
COPY ./packages/webapp /app/packages/webapp

View File

@@ -5,5 +5,10 @@ module.exports = {
alias: {
'@': path.resolve(__dirname, 'src'),
},
configure: {
resolve: {
fallback: { path: require.resolve('path-browserify') },
},
},
},
};

View File

@@ -5,4 +5,8 @@ server {
root /usr/share/nginx/html;
try_files $uri /index.html;
}
location /api {
proxy_pass http://localhost:3000;
}
}