forked from nosoop/moombox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
27 lines (18 loc) · 875 Bytes
/
Containerfile
File metadata and controls
27 lines (18 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM docker.io/library/python:3.11-slim-bookworm
# Install the project into `/app`
WORKDIR /app
RUN apt-get update \
&& apt-get install --no-install-recommends --assume-yes pkg-config ffmpeg ca-certificates git \
&& rm -rf /var/lib/apt/lists/*
# Add source code and set up an editable install
ADD . /app
RUN --mount=type=cache,target=/root/.cache/pip \
python3.11 -m venv /app/.venv && /app/.venv/bin/pip install -e "/app"
# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"
# moombox has an environment variable backdoor to override the instance path
ENV MOOMBOX_INSTANCE_PATH="/data/config"
# Ensure that hypercorn is doing work in our data directory; moombox does workdir-relative paths
WORKDIR /data
ENTRYPOINT [ "hypercorn", "moombox.app:create_app()", "--workers", "1" ]
CMD [ "--bind", "0.0.0.0:5000" ]