-
Notifications
You must be signed in to change notification settings - Fork 31
/
Dockerfile
62 lines (45 loc) · 1.34 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# Build frontend
#
FROM node:20 AS build
RUN mkdir /frontend
WORKDIR /frontend
COPY ./frontend/index.html /frontend/index.html
COPY ./frontend/package.json /frontend/package.json
COPY ./frontend/public /frontend/public
COPY ./frontend/vite.config.* /frontend/
COPY ./frontend/tsconfig.jso[n] /frontend/
COPY ./frontend/tsconfig.node.jso[n] /frontend/
RUN yarn install
COPY ./frontend/src /frontend/src
RUN yarn build
#
# Main container
#
FROM python:3.11
ENV PYTHONBUFFERED=1
RUN mkdir /backend
WORKDIR /backend
COPY ./backend/pyproject.toml /backend/pyproject.toml
RUN apt-get update && \
apt-get install -y --no-install-recommends \
postgresql-client \
ffmpeg
RUN \
pip install -U pip && \
pip install poetry && \
poetry config virtualenvs.create false && \
poetry install --no-interaction --no-ansi --only main
COPY ./backend/static /backend/static
COPY ./backend/start.sh /backend/start.sh
COPY ./backend/reload.sh /backend/reload.sh
COPY ./backend/demogen /backend/demogen
COPY ./backend/linker /backend/linker
COPY ./backend/setup /backend/setup
COPY ./backend/schemas /backend/schemas
COPY ./backend/ayon_server /backend/ayon_server
COPY ./backend/api /backend/api
COPY ./RELEAS[E] /backend/RELEASE
COPY --from=build /frontend/dist/ /frontend
RUN sh -c 'date +%y%m%d%H%M > /backend/BUILD_DATE'
CMD ["/bin/bash", "/backend/start.sh"]