Skip to content

Commit

Permalink
Improve/fix deploymint
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Jan 12, 2024
1 parent b19a769 commit fd3e1b6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN mkdir -p /opt/bitpoll

WORKDIR /opt/bitpoll

RUN apt update && apt install -y --no-install-recommends libldap-2.5-0 libsasl2-2 && rm -rf /var/lib/apt/lists/*
RUN apt update && apt install -y --no-install-recommends libldap-2.5-0 libsasl2-2 uwsgi uwsgi-plugin-python3 && rm -rf /var/lib/apt/lists/*

FROM common-base as base-builder

Expand All @@ -23,7 +23,7 @@ RUN apt-get update && apt-get -y --no-install-recommends install g++ wget python

COPY requirements-production.txt .

RUN pip install --no-warn-script-location --prefix=/install -U -r requirements-production.txt uwsgi
RUN pip install --no-warn-script-location --prefix=/install -U -r requirements-production.txt

FROM dependencies as collect-static

Expand Down
1 change: 1 addition & 0 deletions bitpoll/settings_local.sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#OPENID_CLIENT_SECRET = "..."
#OPENID_BASE_URI = "..."
#OPENID_SCOPE = "openid profile email"
#OPENID_USER_MAPPER = 'bitpoll.base.openid.BitpollUserMapper'
#LOGIN_URL = "simple_openid_connect_django:login"
#LOGOUT_REDIRECT_URL = "index"

Expand Down
15 changes: 5 additions & 10 deletions docker_files/uwsgi-bitpoll.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[uwsgi]

procname-master = uwsgi %n
master = true
socket = :3008
http = :3009

logger = file:/opt/log/bitpoll.log
touch-logreopen = /opt/log/reopen_log.trigger
plugins = python3

chdir = /opt/bitpoll
virtualenv = /usr/local

module = bitpoll.wsgi:application
env = DJANGO_SETTINGS_MODULE=bitpoll.settings
Expand All @@ -19,15 +19,10 @@ uid = www-data
gid = www-data
umask = 027

; run with at least 1 process but increase up to 4 when needed
; run with at least 2 process but increase up to 8 when needed
processes = 8
threads = 4
cheaper = 2

; reload whenever this config file changes
; %p is the full path of the current config file
touch-reload = %p

; disable uWSGI request logging
disable-logging = true

enable-threads = true
1 change: 0 additions & 1 deletion requirements-production.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
sentry-sdk
django-auth-ldap
uwsgi
psycopg2-binary
simple_openid_connect[django]
2 changes: 0 additions & 2 deletions requirements-production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ urllib3==2.1.0
# via
# requests
# sentry-sdk
uwsgi==2.0.23
# via -r requirements-production.in
vobject==0.9.6.1
# via caldav
webencodings==0.5.1
Expand Down

0 comments on commit fd3e1b6

Please sign in to comment.