32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
FROM node:20.8.0-alpine as build
|
|
|
|
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
|
|
|
|
RUN cp -r /usr/src/app/src /usr/src/app/public
|
|
|
|
RUN cp /usr/src/app/public/avatar.svg /usr/src/app/public/avatar-full.svg
|
|
RUN sed -i 's/width="613.53674" height="613.53668" viewBox="0 0 613.53676 613.53668"/width="1004" height="565" viewBox="-549 -195 1820 1020"/g' /usr/src/app/public/avatar-full.svg
|
|
|
|
RUN cp /usr/src/app/public/avatar-full.svg /usr/src/app/public/avatar-totally-secret-variant.svg
|
|
RUN sed -i '/<path d="M 0,0 H 1365 V 768 H 0 Z" style="display:inline;fill:#fb8919;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path421242" inkscape:label="Orange" \/>/d' /usr/src/app/public/avatar-totally-secret-variant.svg
|
|
|
|
FROM httpd:2.4.58-alpine
|
|
|
|
# No access logs
|
|
RUN sed -i 's/LoadModule log_config_module modules\/mod_log_config.so//g' /usr/local/apache2/conf/httpd.conf
|
|
|
|
# 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
|
|
|
|
COPY --from=build /usr/src/app/public/ /usr/local/apache2/htdocs/
|