File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 = [
3636[tool .pdm .scripts ]
3737dev.env = { "GITHUB_TOKEN" = " demo" , "SKIP_TOKEN_CHECK" = " true" }
3838dev.cmd = " python main.py --reload"
39- server = " uvicorn main:app --reload --port 8080 --host 0.0.0.0"
4039
4140[tool .pdm .build ]
4241includes = []
You can’t perform that action at this time.
0 commit comments