mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2026-02-10 03:40:04 +00:00
Compare commits
10 Commits
rewrite
...
f71c3f6233
| Author | SHA1 | Date | |
|---|---|---|---|
| f71c3f6233 | |||
| 219bd304d6 | |||
| 5171a308be | |||
| 2686eddf88 | |||
| ab5b7c1d29 | |||
| 540f63cd85 | |||
| 262e350f7b | |||
| 454d91977c | |||
| 74e55ef1b9 | |||
| 5212ca61bd |
@@ -1,4 +1,5 @@
|
||||
---
|
||||
domain: openpunk.com
|
||||
contact_email: openpunk@proton.me
|
||||
onionDomain: opnpnk6eutjiqy4ndpyvwxd5pncj2g2cmz6fkocr5uh3omnn4utvspad.onion
|
||||
onionDomain: opnpnk6eutjiqy4ndpyvwxd5pncj2g2cmz6fkocr5uh3omnn4utvspad.onion
|
||||
giteaPort: 3000
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
- name: Dump Gitea
|
||||
shell:
|
||||
cmd: gitea dump -c /etc/gitea/app.ini --work-path=/etc/gitea --file=gitea-dump.zip --tempdir=/etc/gitea/temp
|
||||
cmd: gitea dump -c /etc/gitea/gitea.ini --work-path=/etc/gitea --file=gitea-dump.zip --tempdir=/etc/gitea/temp
|
||||
chdir: /etc/gitea
|
||||
become: true
|
||||
become_method: su
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
- name: Remove remote dump
|
||||
file:
|
||||
path: "{{ giteaBackup }}"
|
||||
path: /etc/gitea/gitea-dump.zip
|
||||
state: absent
|
||||
tags: backup
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
gitea_fqdn: 'git.{{ domain }}'
|
||||
gitea_home: '/var/lib/gitea'
|
||||
gitea_db_type: 'sqlite3'
|
||||
gitea_theme_default: 'arc-green'
|
||||
gitea_theme_default: 'gitea-dark'
|
||||
gitea_root_url: 'https://git.{{ domain }}'
|
||||
gitea_protocol: http
|
||||
gitea_http_port: "{{ giteaPort }}"
|
||||
@@ -15,6 +15,7 @@
|
||||
gitea_allow_only_internal_registration: true
|
||||
gitea_disable_registration: true
|
||||
gitea_require_signin: false
|
||||
gitea_lfs_server_enabled: true
|
||||
|
||||
- name: Backup db
|
||||
include_tasks: backup.yml
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
- name: Install repositories
|
||||
copy:
|
||||
src: /etc/gitea/gitea-dump/repos/
|
||||
dest: /var/lib/gitea/gitea-repositories/
|
||||
dest: /var/lib/gitea/repos/
|
||||
remote_src: true
|
||||
owner: gitea
|
||||
tags: restore
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
include_role:
|
||||
name: geerlingguy.nginx
|
||||
vars:
|
||||
nginx_listen_ipv6: true
|
||||
nginx_listen_ipv6: false
|
||||
nginx_vhosts:
|
||||
- listen: "443 ssl http2"
|
||||
server_name: "{{ domain }}"
|
||||
root: "/var/www/{{ domain }}/public"
|
||||
index: "index.html index.htm"
|
||||
extra_parameters: |
|
||||
listen [::]:443 ssl http2;
|
||||
location / {
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
try_files $uri $uri/ =404;
|
||||
@@ -35,19 +36,36 @@
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
- listen: "80" # redirect http requests to https
|
||||
server_name: "{{ domain }}"
|
||||
return: "301 https://{{ domain }}$request_uri"
|
||||
filename: "{{ domain }}.80.conf"
|
||||
- listen: "443 ssl http2"
|
||||
server_name: "git.{{ domain }}"
|
||||
client_max_body_size: "100M"
|
||||
client_max_body_size: "512M"
|
||||
extra_parameters: |
|
||||
listen [::]:443 ssl http2;
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
location / {
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
proxy_pass http://localhost:{{ giteaPort }};
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
ssl_certificate /etc/letsencrypt/live/{{ domain }}/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
- listen: "2171"
|
||||
- listen: "80" # redirect http requests to https
|
||||
server_name: "git.{{ domain }}"
|
||||
return: "301 https://git.{{ domain }}$request_uri"
|
||||
filename: "git.{{ domain }}.80.conf"
|
||||
- listen: "127.0.0.1:2171"
|
||||
server_name: "{{ onionDomain }}"
|
||||
root: "/var/www/{{ domain }}/tor"
|
||||
index: "index.html index.htm"
|
||||
|
||||
Reference in New Issue
Block a user