From f9c23a6fca910df45cdfe974cfd6f9f06a7b072d Mon Sep 17 00:00:00 2001 From: Kumi Date: Sun, 2 Jun 2024 20:43:53 +0200 Subject: [PATCH] feat: Add uWSGI config for privatecoffee-dev Introduce a new uWSGI configuration for the Private.coffee development environment. This setup specifies the main application module, user/group IDs, process management settings, Python plugin usage, virtual environment path, working directory, environment variables, and socket ownership settings. It is tailored to streamline development workflows by ensuring that the server environment closely mirrors production settings while incorporating development-specific features such as debug mode. This addition marks a foundational step in improving local development setup and potentially eases the transition between development and production environments. This configuration uses environment variables to flag development mode, enabling enhanced logging and debug capabilities without affecting the production settings. It also outlines the setup for socket communication and permissions, ensuring secure and efficient inter-process communication during development. The choice of uWSGI parameters and settings was made to optimize resource usage and facilitate a more controlled development environment, aiming for consistency across development and deployment stages. --- contrib/uwsgi/privatecoffee-dev.ini | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 contrib/uwsgi/privatecoffee-dev.ini diff --git a/contrib/uwsgi/privatecoffee-dev.ini b/contrib/uwsgi/privatecoffee-dev.ini new file mode 100644 index 0000000..ce060f6 --- /dev/null +++ b/contrib/uwsgi/privatecoffee-dev.ini @@ -0,0 +1,16 @@ +[uwsgi] +module = main:app + +uid = %n +gid = %n +master = true +processes = 5 + +plugins = python3 +virtualenv = /srv/%n/venv/ +chdir = /srv/%n/ + +env = PRIVATECOFFEE_DEV=true + +http-socket = /var/run/uwsgi/%n.sock +chown-socket = caddy \ No newline at end of file