From a57517f8dbbcdd98d020c9f89e12d85294d37702 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 7 Aug 2022 21:36:21 -0400 Subject: [PATCH] updated conf --- conf/isso.cfg | 37 +++++++++++++++++++++++++++++++++++++ conf/nginx.conf | 28 +++++----------------------- conf/systemd.service | 5 +++-- 3 files changed, 45 insertions(+), 25 deletions(-) create mode 100644 conf/isso.cfg diff --git a/conf/isso.cfg b/conf/isso.cfg new file mode 100644 index 0000000..2d33317 --- /dev/null +++ b/conf/isso.cfg @@ -0,0 +1,37 @@ +[moderation] +enabled = true +approve-if-email-previously-approved = true +purge-after = 69d + +[general] +dbpath = __DATADIR__/comments.db +host = __TARGETDOMAIN__ +notify = smtp +gravatar = true + +[smtp] +; SMTP settings +username = +password = +host = localhost +port = 25 +security = none +to = __ADMINMAIL__ +from = "Isso Comments" +timeout = 10 + +[server] +listen = http://localhost:__PORT__ +public-endpoint = + +[guard] +enabled = true +ratelimit = 2 +direct-reply = 3 +reply-to-self = false +require-author = false +require-email = false + +[admin] +enabled = true +password = __PASSWORD__ \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index 6b738ce..f20ab3c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,28 +1,10 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - - # Path to source - alias __FINALPATH__/; - -### Example PHP configuration (remove it if not used) - index index.php; - - # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; - - try_files $uri $uri/ index.php; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; - - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; - } -### End of PHP configuration part + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + # include conf.d/yunohost_panel.conf.inc; } diff --git a/conf/systemd.service b/conf/systemd.service index 7bb448e..336467d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Small description of the service +Description=isso commenting system After=network.target [Service] @@ -7,7 +7,8 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__/ -ExecStart=__FINALPATH__/script +Environment=ISSO_SETTINGS=__FINALPATH__/isso.cfg +ExecStart=__FINALPATH__/venv/bin/gunicorn -b localhost:__PORT__ -w 4 --preload isso.run StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=inherit