Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependencies for connecting to PostgreSQL #112

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM python:3.12-alpine

# Ensure that the environment uses UTF-8 encoding by default.
ENV LANG en_US.UTF-8

Check warning on line 4 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Disable pip cache dir.
ENV PIP_NO_CACHE_DIR 1

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Allow pip install as root.
ENV PIP_ROOT_USER_ACTION ignore

Check warning on line 10 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Stops Python default buffering to stdout, improving logging to the console.
ENV PYTHONUNBUFFERED 1

Check warning on line 13 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

# Create a non-root user for the container.
ARG USERNAME=app
Expand All @@ -26,7 +26,7 @@
$USERNAME

# Define app home and workdir.
ENV APP_HOME /home/$USERNAME

Check warning on line 29 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
WORKDIR $APP_HOME

# Copy the whole project except for what is in .dockerignore.
Expand All @@ -40,6 +40,7 @@
\
# Needed at runtime.
apk add --no-cache \
libpq \
libxslt \
libxml2 \
; \
Expand Down Expand Up @@ -83,6 +84,6 @@

ARG PORT=8000
EXPOSE $PORT
ENV PORT $PORT

Check warning on line 87 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Legacy key/value format with whitespace separator should not be used

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format More info: https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/

CMD python manage.py runserver 0.0.0.0:$PORT

Check warning on line 89 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ django-filter==24.3
django-modelcluster==6.3
djangorestframework==3.15.2
djangorestframework-csv==3.0.0
psycopg2-binary==2.9.9
whitenoise==6.7.0

# Ensure libxml2 is loaded dynamically; see
Expand Down