src.nth.io/

summaryrefslogtreecommitdiff
path: root/writefreely/server/templates
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2021-07-04 12:05:24 -0500
committerLuke Hoersten <[email protected]>2021-07-04 12:05:24 -0500
commitf8aa3247303a857a07581d9e97d08347d149b4d5 (patch)
treed4e902fed13c2e7bc0544fbaec20542ab12362f1 /writefreely/server/templates
parent74bb4077fed1ed5927e4e0385c75d469af6debbf (diff)
Added writefreely backup.
Diffstat (limited to 'writefreely/server/templates')
-rw-r--r--writefreely/server/templates/config.ini.j271
-rw-r--r--writefreely/server/templates/nginx.conf.j254
-rw-r--r--writefreely/server/templates/[email protected]12
3 files changed, 137 insertions, 0 deletions
diff --git a/writefreely/server/templates/config.ini.j2 b/writefreely/server/templates/config.ini.j2
new file mode 100644
index 0000000..bb5fe7f
--- /dev/null
+++ b/writefreely/server/templates/config.ini.j2
@@ -0,0 +1,71 @@
+[server]
+hidden_host =
+port = {{writefreely_port}}
+bind = localhost
+tls_cert_path =
+tls_key_path =
+autocert = false
+templates_parent_dir =
+static_parent_dir =
+pages_parent_dir =
+keys_parent_dir =
+hash_seed =
+
+[database]
+type = sqlite3
+filename = writefreely.db
+username =
+password =
+database = writefreely
+host = localhost
+port = 3306
+
+[app]
+site_name = {{writefreely_site_name}}
+site_description =
+host = {{writefreely_url}}
+theme = write
+editor =
+disable_js = false
+webfonts = true
+landing = /read
+simple_nav = false
+wf_modesty = false
+chorus = false
+forest = false
+disable_drafts = false
+single_user = false
+open_registration = false
+min_username_len = 3
+max_blogs = 1
+federation = true
+public_stats = true
+private = false
+local_timeline = true
+user_invites = admin
+default_visibility = public
+update_checks = false
+
+[oauth.slack]
+client_id =
+client_secret =
+team_id =
+callback_proxy =
+callback_proxy_api =
+
+[oauth.writeas]
+client_id =
+client_secret =
+auth_location =
+token_location =
+inspect_location =
+callback_proxy =
+callback_proxy_api =
+
+[oauth.gitlab]
+client_id =
+client_secret =
+host =
+display_name =
+callback_proxy =
+callback_proxy_api =
diff --git a/writefreely/server/templates/nginx.conf.j2 b/writefreely/server/templates/nginx.conf.j2
new file mode 100644
index 0000000..4f1cf4d
--- /dev/null
+++ b/writefreely/server/templates/nginx.conf.j2
@@ -0,0 +1,54 @@
+server {
+ listen 80;
+ server_name {{nginx_server_name}};
+ return 301 https://$host$request_uri;
+}
+
+server {
+ listen 443 ssl http2;
+ server_name {{nginx_server_name}};
+
+ ssl_certificate {{nginx_ssl_cert}};
+ ssl_certificate_key {{nginx_ssl_privkey}};
+ ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
+
+ gzip on;
+ gzip_types
+ application/javascript
+ application/x-javascript
+ application/json
+ application/rss+xml
+ application/xml
+ image/svg+xml
+ image/x-icon
+ application/vnd.ms-fontobject
+ application/font-sfnt
+ text/css
+ text/plain;
+ gzip_min_length 256;
+ gzip_comp_level 5;
+ gzip_http_version 1.1;
+ gzip_vary on;
+
+ location ~ ^/.well-known/(webfinger|nodeinfo|host-meta) {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
+ proxy_redirect off;
+ }
+
+ location ~ ^/(css|img|js|fonts)/ {
+ root {{nginx_static_content}};
+ # Optionally cache these files in the browser:
+ # expires 12M;
+ }
+
+ location / {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $remote_addr;
+ proxy_pass http://127.0.0.1:{{nginx_proxy_port}};
+ proxy_redirect off;
+ }
+}
diff --git a/writefreely/server/templates/[email protected] b/writefreely/server/templates/[email protected]
new file mode 100644
index 0000000..bf0d03b
--- /dev/null
+++ b/writefreely/server/templates/[email protected]
@@ -0,0 +1,12 @@
+[Unit]
+Description=WriteFreely %I Instance
+After=syslog.target network.target
+
+[Service]
+WorkingDirectory={{writefreely_dir}}/%i/
+ExecStart=/usr/local/bin/writefreely
+Restart=always
+User={{writefreely_user}}
+
+[Install]
+WantedBy=multi-user.target