Skip to content

Commit

Permalink
Scale the uwsgi container (qgis#399)
Browse files Browse the repository at this point in the history
* Scale the uwsgi container, remove deprecated version in docker-compose.yml

* Add ENABLE_LDAP to the environment variable
  • Loading branch information
Xpirix authored May 8, 2024
1 parent b023a13 commit 07412e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion dockerize/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ EMAIL_HOST_PASSWORD=''
DEFAULT_PLUGINS_SITE='https://plugins.qgis.org/'

# ENV: debug or prod
QGISPLUGINS_ENV=debug
QGISPLUGINS_ENV=debug

# Ldap
ENABLE_LDAP=True
2 changes: 1 addition & 1 deletion dockerize/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ web: db
@echo "------------------------------------------------------------------"
@echo "Running in production mode"
@echo "------------------------------------------------------------------"
@docker compose -p $(PROJECT_ID) up -d uwsgi web worker beat
@docker compose -p $(PROJECT_ID) up -d --scale uwsgi=2 web worker beat

dbbackups: db
@echo
Expand Down
3 changes: 1 addition & 2 deletions dockerize/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
volumes:
postgres_data:
rabbitmq:
Expand Down Expand Up @@ -26,7 +25,6 @@ services:
restart: unless-stopped

uwsgi: &uwsgi-common
container_name: qgis-plugins-uwsgi-common
build:
context: ${PWD}/../
dockerfile: dockerize/docker/Dockerfile
Expand All @@ -43,6 +41,7 @@ services:
- VIRTUAL_HOST=${VIRTUAL_HOST:-plugins.kartoza.com}
- VIRTUAL_PORT=${VIRTUAL_PORT:-8080}
- DEBUG=${DEBUG:-False}
- ENABLE_LDAP=${ENABLE_LDAP:-False}
- RABBITMQ_HOST=${RABBITMQ_HOST:-rabbitmq}
- BROKER_URL=amqp://rabbitmq:5672
- EMAIL_BACKEND=${EMAIL_BACKEND}
Expand Down
2 changes: 1 addition & 1 deletion dockerize/docker/uwsgi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ logger = file:/var/log/uwsgi-errors.log
#uid = 1000
#gid = 1000
memory-report = true
harakiri = 2000
harakiri = 50
listen = 127

0 comments on commit 07412e8

Please sign in to comment.