-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (27 loc) · 856 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.10 AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
COPY pyproject.toml .
COPY uv.lock .
RUN uv sync
FROM node:16 AS css
COPY front wrk/front
COPY app/templates wrk/app/templates
WORKDIR /wrk/front
ENV NODE_ENV=production
RUN npm ci --also=dev && npx tailwindcss -i src/tailwind.css -c tailwind.config.js -o dist/main.css --minify
FROM python:3.10 AS docs
COPY build wrk/build
WORKDIR /wrk/build
RUN pip install pyyaml
RUN python docs.py
FROM python:3.10-slim
COPY --from=builder /.venv /.venv
ENV PATH=/.venv/bin:$PATH
WORKDIR /app
COPY app app
COPY --from=css /wrk/front/dist/main.css app/static/bundled/main.css
COPY --from=docs /wrk/build/dist/version/version.yml app/config/version.yml
COPY --from=docs /wrk/build/dist/docs app/docs
EXPOSE 8000
ENTRYPOINT [ "emmett" ]
CMD [ "serve", "--host", "0.0.0.0" ]