Skip to content

Commit

Permalink
fix issues (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak authored Feb 1, 2024
1 parent 84ce1c6 commit c2308a1
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 77 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pillow = "==10.0.0"
argon2-cffi = "==23.1.0"
whitenoise = "==6.6.0"
redis = "==5.0.1"
beautifulsoup4 = "==4.12.3"
celery = "==5.3.6"
django = "==4.2.6"
djangoql = "==0.17.1"
Expand Down
151 changes: 84 additions & 67 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions compose/local/django/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ FROM python as python-build-stage

ARG BUILD_ENVIRONMENT=local

ENV PATH /venv/bin:$PATH

# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
# dependencies for building Python packages
Expand Down
2 changes: 2 additions & 0 deletions compose/production/django/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ FROM python as python-build-stage

ARG BUILD_ENVIRONMENT=production

ENV PATH /venv/bin:$PATH

# Install apt packages
RUN apt-get update && apt-get install --no-install-recommends -y \
# dependencies for building Python packages
Expand Down
13 changes: 4 additions & 9 deletions compose/production/django/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ postgres_ready() {
python << END
import sys
import psycopg2
import psycopg
try:
psycopg2.connect(
dbname="${POSTGRES_DB}",
user="${POSTGRES_USER}",
password="${POSTGRES_PASSWORD}",
host="${POSTGRES_HOST}",
port="${POSTGRES_PORT}",
)
except psycopg2.OperationalError:
psycopg.connect(conninfo="${DATABASE_URL}")
except psycopg.OperationalError as e:
print(e)
sys.exit(-1)
sys.exit(0)
Expand Down
2 changes: 1 addition & 1 deletion compose/production/django/start
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ fi

python /app/manage.py collectstatic --noinput
python /app/manage.py migrate
/usr/local/bin/gunicorn core.wsgi --bind 0.0.0.0:5000 --timeout 180 --chdir=/app
gunicorn core.wsgi --bind 0.0.0.0:5000 --timeout 180 --chdir=/app

0 comments on commit c2308a1

Please sign in to comment.