-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.dockerfile
More file actions
36 lines (22 loc) · 802 Bytes
/
Copy pathapp.dockerfile
File metadata and controls
36 lines (22 loc) · 802 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
28
29
30
31
32
33
34
35
36
FROM node:20-slim as build_web
COPY ./app /usr/src/app/app
COPY ./server /usr/src/app/server
WORKDIR /usr/src/app
RUN cd app && npm install && npm run build
RUN mkdir -p server/static \
&& cp -r app/build/* server/static \
&& cp -r server/static/static/* server/static \
&& rm -rf server/static/static \
&& rm -rf app
FROM python:3.10-slim
# install ffmpeg
RUN apt-get update && apt-get install -y ffmpeg procps --no-install-recommends && rm -rf /var/lib/apt/lists/*
COPY --from=build_web /usr/src/app/server /usr/src/app/
WORKDIR /usr/src/app
RUN pip install --upgrade pip && pip install pipenv
RUN pipenv lock && pipenv install --system --deploy
# update permissions on app folder
RUN chmod -R 777 /usr/src/app
RUN mkdir -p /data
EXPOSE 8000
CMD [ "python3", "main.py" ]