forked from fabiovalentino/threejs_radar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 1.02 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
FROM node:21.6.2-alpine as build
WORKDIR /usr/local/app
ADD ./package.json /usr/local/app/
ADD ./package-lock.json /usr/local/app/
# Install all the dependencies
RUN npm install --only-production
RUN mkdir /usr/local/app/src
COPY ./src/ /usr/local/app/src/
ADD ./angular.json /usr/local/app/
ADD ./browserslist /usr/local/app/
ADD ./tsconfig.json /usr/local/app/
ADD ./tslint.json /usr/local/app/
ENV NODE_OPTIONS="--openssl-legacy-provider --no-experimental-fetch"
# Generate the build of the application
RUN npm run build:prod
FROM httpd:2.4
COPY --from=build /usr/local/app/dist/prod /usr/local/apache2/htdocs/
COPY .htaccess /usr/local/apache2/htdocs/
COPY httpd.conf /usr/local/apache2/conf/httpd.conf
RUN chmod -R 755 /usr/local/apache2/htdocs/
COPY ./.htpasswd /usr/local/apache2/.htpasswd
COPY ./gensslcert.sh /usr/local/apache2/gensslcert.sh
RUN ./gensslcert.sh
# Copy the build output to replace the default nginx contents.
#COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf
#COPY ./default.conf /etc/nginx/conf.d/default.conf