33 lines
1.4 KiB
Docker
33 lines
1.4 KiB
Docker
# syntax=docker/dockerfile:1.4
|
|
FROM alpine/git:2.47.2 AS source
|
|
|
|
ARG SPIRIT_GIT_REF=c2ed239
|
|
WORKDIR /src
|
|
|
|
RUN git clone https://github.com/edankwan/The-Spirit.git app \
|
|
&& cd app \
|
|
&& git checkout "${SPIRIT_GIT_REF}" \
|
|
&& rm -rf .git
|
|
|
|
FROM nginx:1.27-alpine
|
|
|
|
COPY --from=source /src/app/app/ /usr/share/nginx/html/
|
|
COPY index.html /usr/share/nginx/html/index.html
|
|
|
|
# Hide intro elements (.logo, .instruction, .footer, .mobile) immediately via CSS
|
|
RUN sed -i 's@</head>@<style>.logo, .instruction, .footer, .mobile { display: none !important; }</style></head>@' /usr/share/nginx/html/index.html
|
|
|
|
COPY stemengine-spirit-prehook.js /usr/share/nginx/html/stemengine-spirit-prehook.js
|
|
COPY stemengine-spirit-adapter.js /usr/share/nginx/html/stemengine-spirit-adapter.js
|
|
COPY --from=shared stemengine-bootstrap.js /usr/share/nginx/html/stemengine-bootstrap.js
|
|
COPY --from=shared stemengine-router.js /usr/share/nginx/html/stemengine-router.js
|
|
COPY --from=shared stemengine-audio-engine.js /usr/share/nginx/html/stemengine-audio-engine.js
|
|
COPY --from=shared stemengine-feature-extractor.js /usr/share/nginx/html/stemengine-feature-extractor.js
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
RUN grep -q 'stemengine-spirit-prehook.js' /usr/share/nginx/html/index.html \
|
|
&& grep -q 'stemengine-spirit-adapter.js' /usr/share/nginx/html/index.html \
|
|
&& grep -q 'stemengine-router.js' /usr/share/nginx/html/index.html
|
|
|
|
EXPOSE 80
|