Fix the web interface & update the Dockerfile (#378)
* fix: update paths * fix: change path * fix: build the full image in one step --------- Co-authored-by: knoflook <knoflook@disroot.org>
This commit is contained in:
17
Dockerfile
17
Dockerfile
@ -1,3 +1,4 @@
|
||||
ARG ARCH=
|
||||
FROM python:3-slim-bullseye AS python-builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /botamusique
|
||||
@ -6,11 +7,23 @@ RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y gcc g++ ffmpeg libjpeg-dev libmagic-dev opus-tools zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY . /botamusique
|
||||
|
||||
RUN python3 -m venv venv \
|
||||
&& venv/bin/pip install wheel \
|
||||
&& venv/bin/pip install -r requirements.txt
|
||||
|
||||
FROM ${ARCH}node:14-bullseye-slim AS node-builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /botamusique/web
|
||||
COPY --from=python-builder /botamusique /botamusique
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM ${ARCH}python:3-slim-bullseye AS template-builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /botamusique
|
||||
COPY --from=node-builder /botamusique /botamusique
|
||||
RUN venv/bin/python scripts/translate_templates.py --lang-dir /botamusique/lang --template-dir /botamusique/web/templates
|
||||
|
||||
|
||||
FROM python:3.11-slim-bullseye
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
@ -18,7 +31,7 @@ EXPOSE 8181
|
||||
RUN apt update && \
|
||||
apt install --no-install-recommends -y opus-tools ffmpeg libmagic-dev curl tar && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=python-builder /botamusique /botamusique
|
||||
COPY --from=template-builder /botamusique /botamusique
|
||||
WORKDIR /botamusique
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
|
Reference in New Issue
Block a user