-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (32 loc) · 1.03 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
#==================== Building Stage =====================================
FROM node:14.21.3 as node
WORKDIR /app
# Copy dependency configuration files
COPY package.json /app
COPY package-lock.json /app
# Install dependencies
RUN npm install
# Remove bad extension
RUN rm -rf node_modules/tiptap-extensions/node_modules/
# Copy source files
COPY src /app/src
COPY public /app/public
# Copy build configuration files
COPY tsconfig.json /app
COPY babel.config.js /app
COPY .postcssrc.js /app
# Build the application
RUN npm run build
#==================== Setting up stage ====================
FROM nginx:1.17.10-alpine
EXPOSE 80
WORKDIR /usr/share/nginx/html
# URL for os2autoproces api - defaults to development URL
ENV API_AUTOPROCES 'https://dev.os2autoproces.eu'
# Copy nginx configuration file
COPY Docker/nginx.conf /etc/nginx/conf.d/default.conf
# Copy the built application to the nginx root
COPY --from=node /app/dist/ /usr/share/nginx/html
# Copies and runs startup script
COPY Docker/startup.sh /startup.sh
CMD /bin/sh /startup.sh