File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change
1
+ FROM python:3.11-slim
2
+
3
+ RUN apt-get update && apt-get install postgresql-client cmake -y
4
+
5
+ # install PDM
6
+ RUN pip install -U pip setuptools wheel
7
+ RUN pip install pdm
8
+
9
+ # copy files
10
+ COPY pyproject.toml pdm.lock /project/
11
+ COPY . /project
12
+
13
+ WORKDIR /project
14
+ # TODO: improve caching
15
+
16
+ RUN pdm install --prod --no-lock --no-editable -v
17
+
18
+ RUN SECRET_KEY=secret pdm run python manage.py collectstatic --noinput
19
+
20
+ EXPOSE 8080
21
+
22
+ CMD ["pdm" , "server" ]
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ dev = [
36
36
[tool .pdm .scripts ]
37
37
dev.env = { "GITHUB_TOKEN" = " demo" , "SKIP_TOKEN_CHECK" = " true" }
38
38
dev.cmd = " python main.py --reload"
39
- server = " uvicorn main:app --reload --port 8080 --host 0.0.0.0"
40
39
41
40
[tool .pdm .build ]
42
41
includes = []
You can’t perform that action at this time.
0 commit comments