You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
1.1 KiB

FROM python:3-alpine AS source
ARG VERSION=7.1
WORKDIR /app
RUN apk add --no-cache git
RUN git clone --recurse-submodules https://github.com/azlux/botamusique.git . && git checkout $VERSION
FROM python:3-alpine AS python-builder
WORKDIR /app
COPY --from=source /app .
RUN apk add --no-cache ffmpeg-dev gcc git jpeg-dev musl-dev opus-dev zlib-dev
RUN python3 -m venv venv \
&& venv/bin/pip install wheel opuslib protobuf \
&& venv/bin/pip install -r requirements.txt
RUN chmod +x entrypoint.sh
FROM node:14-alpine AS node-builder
WORKDIR /app/web
COPY --from=source /app/web .
RUN npm install \
&& npm run build
FROM python:3-alpine
ENV BAM_CONFIG_file="/app/configuration.ini"
ENV BAM_CERTIFICATE="/app/botamusique.pem"
WORKDIR /app
COPY --from=python-builder /app .
COPY --from=node-builder /app/static static
COPY --from=node-builder /app/templates templates
RUN apk add --no-cache bash libmagic ffmpeg
RUN venv/bin/python scripts/translate_templates.py --lang-dir /app/lang --template-dir /app/templates
ENTRYPOINT [ "/app/entrypoint.sh" ]
CMD ["/app/venv/bin/python", "/app/mumbleBot.py"]