-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
d91962b
commit 125d8a2
Showing
7 changed files
with
637 additions
and
1,039 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
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,22 +1,24 @@ | ||
FROM python:3.11-slim-buster | ||
ENV LANG C.UTF-8 | ||
|
||
RUN apt-get -y update && apt-get -y autoremove | ||
RUN pip install pipenv | ||
RUN apt-get update && apt-get install -y \ | ||
curl \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh | ||
RUN ls /root/.cargo | ||
ENV PATH="/root/.cargo/bin:$PATH" | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
RUN apt-get install -y python python-pip python-dev | ||
|
||
ADD Pipfile /app/Pipfile | ||
ADD Pipfile.lock /app/Pipfile.lock | ||
RUN pipenv install | ||
ADD pyproject.toml /app/pyproject.toml | ||
ADD uv.lock /app/uv.lock | ||
RUN uv sync | ||
|
||
ADD . /app | ||
ENV DJANGO_SECRET_KEY=dummy | ||
RUN pipenv run python manage.py collectstatic --noinput | ||
RUN uv run python manage.py collectstatic --noinput | ||
ENV DJANGO_SECRET_KEY= | ||
|
||
EXPOSE 8000 | ||
CMD ["pipenv", "run", "newrelic-admin", "run-program", "gunicorn", "pylinks.wsgi:application", "--timeout", "120", "-b", "0.0.0.0:8000", "--access-logfile", "-"] | ||
CMD ["uv", "run", "newrelic-admin", "run-program", "gunicorn", "pylinks.wsgi:application", "--timeout", "120", "-b", "0.0.0.0:8000", "--access-logfile", "-"] |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
[project] | ||
name = "pylinks" | ||
version = "0.1.0" | ||
description = "Searchable database of external links in Python" | ||
readme = "README.md" | ||
requires-python = ">=3.11" | ||
dependencies = [ | ||
"asgiref", | ||
"certifi", | ||
"charset-normalizer", | ||
"dj-database-url", | ||
"django", | ||
"django-grappelli", | ||
"django-haystack", | ||
"gunicorn", | ||
"idna", | ||
"newrelic", | ||
"packaging", | ||
"psycopg2-binary", | ||
"python-dateutil", | ||
"pyuploadcare", | ||
"requests", | ||
"rollbar", | ||
"six", | ||
"sqlparse", | ||
"typing-extensions", | ||
"urllib3", | ||
"whitenoise", | ||
"whoosh", | ||
] | ||
|
||
[tool.uv] | ||
dev-dependencies = [ | ||
"black", | ||
"ruff", | ||
"pre-commit", | ||
] |