Add systemd services and single-server deployment examples

This commit is contained in:
parkel committed 2026-11-21 01:05:09 +01:00
1 parent c20c41b2cd
commit 57e991ea2a
10 files changed
+306 -62

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
Listen 192.168.10.20:8080
<VirtualHost 192.168.10.20:8080>
ServerName panel.example.net
RemoteIPHeader X-Forwarded-For
RemoteIPInternalProxy 192.168.10.10
<Location />
Require expr "%{CONN_REMOTE_ADDR} == '192.168.10.10'"
</Location>
Include /etc/coulobre/panel-proxy.inc
</VirtualHost>
+18
View File
@@ -0,0 +1,18 @@
ProxyRequests Off
ProxyPreserveHost On
ProxyAddHeaders Off
RequestHeader unset X-Forwarded-Protocol
RequestHeader unset X-Forwarded-Ssl
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-For "expr=%{REMOTE_ADDR}"
ProxyPass /static/ !
Alias /static/ /var/www/coulobre-panel-static/
<Directory /var/www/coulobre-panel-static/>
AllowOverride None
Options None
Require all granted
</Directory>
ProxyPass / "unix:/run/coulobre-panel/panel.sock|http://localhost/"
ProxyPassReverse / http://localhost/
+13
View File
@@ -0,0 +1,13 @@
<VirtualHost *:80>
ServerName panel.example.net
Redirect permanent / https://panel.example.net/
</VirtualHost>
<VirtualHost *:443>
ServerName panel.example.net
SSLEngine On
SSLCertificateFile /etc/ssl/coulobre-panel/fullchain.pem
SSLCertificateKeyFile /etc/ssl/coulobre-panel/privkey.pem
Include /etc/coulobre/panel-proxy.inc
</VirtualHost>
+10
View File
@@ -0,0 +1,10 @@
DJANGO_SETTINGS_MODULE=coulobre.settings
COULOBRE_ALLOWED_HOSTS=panel.example.net
COULOBRE_HTTPS_PROXY=1
COULOBRE_STATIC_ROOT=/var/www/coulobre-panel-static
COULOBRE_SECRET_KEY=
COULOBRE_DB_NAME=coulobre_panel
COULOBRE_DB_USER=coulobre
COULOBRE_DB_PASSWORD=
COULOBRE_DB_HOST=/run/mysqld/mysqld.sock
COULOBRE_BROKER_URL=amqp://coulobre:@127.0.0.1:5672/coulobre
+24
View File
@@ -0,0 +1,24 @@
[Unit]
Description=Coulobre Panel Celery scheduler
Wants=network-online.target
After=network-online.target rabbitmq-server.service
[Service]
Type=exec
User=coulobre-panel
Group=coulobre-panel
EnvironmentFile=/etc/coulobre/panel.env
WorkingDirectory=/opt/coulobre
StateDirectory=coulobre-panel
StateDirectoryMode=0700
UMask=0077
ExecStart=/opt/coulobre/bin/celery -A coulobre beat --loglevel=INFO --schedule=/var/lib/coulobre-panel/beat-schedule --pidfile=
Restart=on-failure
RestartSec=5s
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
[Install]
WantedBy=multi-user.target
+25
View File
@@ -0,0 +1,25 @@
[Unit]
Description=Coulobre Panel web service
Wants=network-online.target
After=network-online.target mariadb.service
[Service]
Type=exec
User=coulobre-panel
Group=www-data
EnvironmentFile=/etc/coulobre/panel.env
WorkingDirectory=/opt/coulobre
RuntimeDirectory=coulobre-panel
RuntimeDirectoryMode=0750
UMask=0007
ExecStart=/opt/coulobre/bin/gunicorn --bind unix:/run/coulobre-panel/panel.sock --umask 0o007 --no-control-socket --forwarder-headers= coulobre.wsgi:application
KillMode=mixed
Restart=on-failure
RestartSec=5s
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
[Install]
WantedBy=multi-user.target
+23
View File
@@ -0,0 +1,23 @@
[Unit]
Description=Coulobre Panel Celery worker
Wants=network-online.target
After=network-online.target mariadb.service rabbitmq-server.service
[Service]
Type=exec
User=coulobre-panel
Group=coulobre-panel
EnvironmentFile=/etc/coulobre/panel.env
WorkingDirectory=/opt/coulobre
UMask=0077
ExecStart=/opt/coulobre/bin/celery -A coulobre worker --loglevel=INFO --concurrency=2
KillMode=mixed
Restart=on-failure
RestartSec=5s
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectSystem=strict
[Install]
WantedBy=multi-user.target