Removed docker support.
This commit is contained in:
parent
de270bc842
commit
bfbfe30be4
25
Dockerfile
25
Dockerfile
@ -1,25 +0,0 @@
|
||||
ARG ARCH=
|
||||
FROM python:3.11-slim-bullseye AS python-builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /bragi
|
||||
|
||||
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 . /bragi
|
||||
RUN python3 -m venv venv \
|
||||
&& venv/bin/pip install wheel \
|
||||
&& venv/bin/pip install -r requirements.txt
|
||||
|
||||
FROM python:3.11-slim-bullseye
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
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 /bragi /bragi
|
||||
WORKDIR /bragi
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/bragi/entrypoint.sh" ]
|
||||
CMD ["venv/bin/python", "mumbleBot.py"]
|
@ -1,51 +0,0 @@
|
||||
ARG ARCH=
|
||||
|
||||
FROM ${ARCH}python:3-slim-bullseye AS source
|
||||
ARG VERSION=master
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /bragi
|
||||
RUN apt-get update && apt-get install -y git
|
||||
RUN git clone --recurse-submodules https://github.com/azlux/bragi.git . && git checkout $VERSION
|
||||
|
||||
|
||||
FROM ${ARCH}python:3-slim-bullseye AS python-builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /bragi
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gcc ffmpeg libjpeg-dev libmagic-dev opus-tools zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=source /bragi .
|
||||
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 /bragi/web
|
||||
COPY --from=source /bragi/web .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM ${ARCH}python:3-slim-bullseye AS template-builder
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /bragi
|
||||
COPY --from=python-builder /bragi .
|
||||
COPY --from=node-builder /bragi/templates templates
|
||||
RUN venv/bin/python scripts/translate_templates.py --lang-dir /bragi/lang --template-dir /bragi/web/templates
|
||||
|
||||
|
||||
FROM ${ARCH}python:3-slim-bullseye
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
EXPOSE 8181
|
||||
WORKDIR /bragi
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y ffmpeg libmagic-dev opus-tools zlib1g \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
COPY --from=python-builder /bragi .
|
||||
COPY --from=node-builder /bragi/static static
|
||||
COPY --from=template-builder /bragi/templates templates
|
||||
RUN chmod +x entrypoint.sh
|
||||
ENTRYPOINT [ "/bragi/entrypoint.sh" ]
|
||||
CMD ["/bragi/venv/bin/python", "/bragi/mumbleBot.py"]
|
@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
command=( "${@}" )
|
||||
|
||||
if [ "$1" == "bash" ] || [ "$1" == "sh" ]; then
|
||||
exec "${@}"
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_DB" ]; then
|
||||
command+=( "--db" "$BAM_DB" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_MUSIC_DB" ]; then
|
||||
command+=( "--music-db" "$BAM_MUSIC_DB" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_MUMBLE_SERVER" ]; then
|
||||
command+=( "--server" "$BAM_MUMBLE_SERVER")
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_MUMBLE_PASSWORD" ]; then
|
||||
command+=( "--password" "$BAM_MUMBLE_PASSWORD" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_MUMBLE_PORT" ]; then
|
||||
command+=( "--port" "$BAM_MUMBLE_PORT" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_USER" ]; then
|
||||
command+=( "--user" "$BAM_USER" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_TOKENS" ]; then
|
||||
command+=( "--tokens" "$BAM_TOKENS" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_CHANNEL" ]; then
|
||||
command+=( "--channel" "$BAM_CHANNEL" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_CERTIFICATE" ]; then
|
||||
command+=( "--cert" "$BAM_CERTIFICATE" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_VERBOSE" ]; then
|
||||
command+=( "--verbose" )
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_BANDWIDTH" ]; then
|
||||
command+=( "--bandwidth" "$BAM_BANDWIDTH")
|
||||
fi
|
||||
|
||||
if [ -n "$BAM_CONFIG_file" ]; then
|
||||
if [ ! -f "$BAM_CONFIG_file" ]; then
|
||||
cp "/bragi/configuration.example.ini" "$BAM_CONFIG_file"
|
||||
fi
|
||||
command+=( "--config" "$BAM_CONFIG_file" )
|
||||
else
|
||||
if [ ! -f "/bragi/configuration.ini" ]; then
|
||||
cp "/bragi/configuration.example.ini" "/bragi/configuration.ini"
|
||||
fi
|
||||
command+=( "--config" "/bragi/configuration.ini" )
|
||||
fi
|
||||
|
||||
exec "${command[@]}"
|
Loading…
x
Reference in New Issue
Block a user