-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
26 lines (16 loc) · 809 Bytes
/
Dockerfile
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
FROM python:3-slim-buster as wheel_builder
RUN pip3 install poetry
COPY backend ./backend
RUN cd backend && poetry build && mkdir /out/ && cp dist/*.whl /out/
# Final image
FROM python:3-slim-buster
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install --no-install-recommends -y ffmpeg nginx && apt-get clean && rm -rf /var/lib/apt/lists/* && \
useradd -r python && usermod -g www-data python && mkdir /data && chown python:www-data /data
COPY --from=wheel_builder /out/*.whl /tmp/
RUN pip3 install --no-cache-dir /tmp/*.whl supervisor && rm /tmp/*.whl
COPY frontend/src /var/www/html
COPY default_site /etc/nginx/sites-available/default
COPY supervisord.conf /etc/supervisor/supervisord.conf
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]