-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,293 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
db.sqlite3 | ||
node_modules/ | ||
.coverage/ | ||
.git/ | ||
.mypy_cache/ | ||
.pytest_cache/ | ||
.ruff_cache/ | ||
.venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM python:3.12-slim | ||
|
||
ENV PYTHONDONTWRITEBYTECODE=1 \ | ||
PYTHONUNBUFFERED=1 \ | ||
UV_PROJECT_ENVIRONMENT=/usr/local | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
COPY --from=ghcr.io/astral-sh/uv:0.4.7 /uv /bin/uv | ||
|
||
WORKDIR /app | ||
|
||
RUN addgroup --gid 222 --system app \ | ||
&& adduser --uid 222 --system --group app | ||
|
||
RUN mkdir -p /app && chown app:app /app | ||
|
||
COPY --chown=app:app pyproject.toml uv.lock /app/ | ||
|
||
RUN uv sync --frozen | ||
|
||
COPY --chown=app:app . /app/ | ||
|
||
RUN python manage.py collectstatic --noinput | ||
|
||
USER app | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
version: '3.1' | ||
version: "3.9" | ||
|
||
services: | ||
|
||
db: | ||
image: postgres | ||
restart: always | ||
environment: | ||
POSTGRES_PASSWORD: postgres | ||
web: | ||
build: . | ||
volumes: | ||
- .:/app | ||
ports: | ||
- "5432:5432" | ||
- 8000:8000 | ||
|
||
# db: | ||
# image: postgres | ||
# restart: always | ||
# environment: | ||
# POSTGRES_PASSWORD: postgres | ||
# ports: | ||
# - "5432:5432" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters