Skip to content

Commit d443117

Browse files
authored
Merge pull request #3 from alflanagan/set_up_gunicorn
Set up gunicorn
2 parents 066ccd5 + ad1d554 commit d443117

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ FROM python:3.12.5-slim-bookworm
55
SHELL ["/bin/bash", "-euo", "pipefail", "-c"]
66

77
# Install system packages required by Wagtail and Django.
8+
# hadolint ignore=DL3008
89
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
910
build-essential \
1011
curl \
@@ -28,16 +29,11 @@ ENV PYTHONUNBUFFERED=1 \
2829
# Use /app folder as a directory where the source code is stored.
2930
WORKDIR /app
3031

31-
# requirements handled automatically by uv
32-
# Install the project requirements.
33-
# COPY app/Makefile requirements.txt /app/
34-
# RUN make pip-setup && pip-sync requirements.txt
35-
3632
# Copy the source code of the project into the container.
3733
COPY app /app/
3834

3935
RUN pip install --no-cache-dir uv==0.7.12 && \
4036
uv sync --frozen
4137

42-
# do I need to set up the database for fly?
38+
# Note: Fly automatically sets DATABASE_URL
4339
CMD ["make", "run-server"]

app/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PYTHON=uv run --link-mode=copy python
22

33
run-server:
44
$(PYTHON) manage.py migrate
5-
$(PYTHON) manage.py runserver 0.0.0.0:8080
5+
uv run gunicorn --timeout 30 alloydflanagan.wsgi:application --log-file -
66

77
djhtml:
88
find alloydflanagan -name '*.html' -exec djhtml -i -t2 '{}' +

0 commit comments

Comments
 (0)