forked from esoubiran-aneo/armonik-admin-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (21 loc) · 764 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM node:lts-alpine as build
WORKDIR /usr/src/app
RUN npm install -g pnpm @antfu/ni
COPY package.json ./
COPY pnpm-lock.yaml ./
COPY .npmrc ./
RUN nci
COPY src ./src
COPY tsconfig.* ./
COPY angular.json ./
RUN nr build --base-href=/admin/
FROM nginx:stable as production
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY nginx/nginx.default.conf /etc/nginx/nginx.conf
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/app/dist/ .
RUN groupadd --gid 5000 armonik && useradd --home-dir /home/armonik --create-home --uid 5000 --gid 5000 --shell /bin/sh armonik
USER armonik
RUN mkdir -p /tmp/log/nginx && mkdir -p /tmp/run && mkdir -p /tmp/nginx/{client_body_temp,fastcgi_temp,proxy_temp,uwsgi_temp,scgi_temp}
EXPOSE 1080