2022-11-15 15:45:46 +01:00
|
|
|
FROM node:19.1.0-alpine as build
|
2022-01-05 15:22:32 +01:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
RUN sed -i 's/dl-cdn/dl-5/g' /etc/apk/repositories && sed -i 's/http:/https:/g' /etc/apk/repositories
|
|
|
|
|
|
|
|
COPY package.json /usr/src/app/
|
|
|
|
COPY package-lock.json /usr/src/app/
|
|
|
|
|
|
|
|
RUN npm install --production
|
|
|
|
|
|
|
|
COPY . /usr/src/app
|
|
|
|
RUN npx tsc -p tsconfig.json
|
|
|
|
|
2022-01-05 15:53:14 +01:00
|
|
|
RUN cp -r /usr/src/app/src /usr/src/app/public
|
|
|
|
|
2022-11-15 15:45:46 +01:00
|
|
|
FROM httpd:2.4.54-alpine
|
2022-01-05 15:22:32 +01:00
|
|
|
|
2022-02-04 19:02:28 +01:00
|
|
|
# No access logs
|
|
|
|
RUN sed -i 's/LoadModule log_config_module modules\/mod_log_config.so//g' /usr/local/apache2/conf/httpd.conf
|
|
|
|
|
2022-04-14 17:19:54 +02:00
|
|
|
# Enable rewrite
|
|
|
|
RUN sed -i '/LoadModule rewrite_module/s/^#//g' /usr/local/apache2/conf/httpd.conf
|
|
|
|
RUN sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /usr/local/apache2/conf/httpd.conf
|
|
|
|
|
2022-01-05 15:22:32 +01:00
|
|
|
COPY --from=build /usr/src/app/public/ /usr/local/apache2/htdocs/
|