-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (33 loc) · 915 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
42
43
FROM python:3.12-bookworm
RUN mkdir app
WORKDIR /app
ENV PATH="${PATH}:/root/.local/bin"
ENV PYTHONPATH=.
RUN apt update && apt install -y cron npm
RUN mkdir scripts
COPY README.md .
COPY assets ./assets/
COPY static ./static/
COPY templates ./templates/
COPY manage.py .
COPY MANIFEST.in .
COPY uv.lock .
COPY pyproject.toml .
COPY vite.config.mjs .
COPY package.json .
COPY package-lock.json .
COPY scripts/dev-entry.sh scripts/dev-entry.sh
# Dev only
RUN echo '!! If the next step fails, copy .env.example to .env in the backend folder !!'
COPY .env* .
RUN rm .env.example
# Add this hack to line it up with our dev environment.
# I'll buy whoever fixes this a coffee.
RUN mkdir src
RUN ln -s /app/thunderbird_accounts src/thunderbird_accounts
RUN pip install --upgrade pip
RUN pip install uv
RUN uv sync
RUN npm install && npm cache clean --force
EXPOSE 5000
CMD ["/bin/sh", "./scripts/dev-entry.sh"]