mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2026-02-10 11:50:03 +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
|
domain: openpunk.com
|
||||||
contact_email: openpunk@proton.me
|
contact_email: openpunk@proton.me
|
||||||
onionDomain: opnpnk6eutjiqy4ndpyvwxd5pncj2g2cmz6fkocr5uh3omnn4utvspad.onion
|
onionDomain: opnpnk6eutjiqy4ndpyvwxd5pncj2g2cmz6fkocr5uh3omnn4utvspad.onion
|
||||||
|
giteaPort: 3000
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
- name: Dump Gitea
|
- name: Dump Gitea
|
||||||
shell:
|
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
|
chdir: /etc/gitea
|
||||||
become: true
|
become: true
|
||||||
become_method: su
|
become_method: su
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
- name: Remove remote dump
|
- name: Remove remote dump
|
||||||
file:
|
file:
|
||||||
path: "{{ giteaBackup }}"
|
path: /etc/gitea/gitea-dump.zip
|
||||||
state: absent
|
state: absent
|
||||||
tags: backup
|
tags: backup
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
gitea_fqdn: 'git.{{ domain }}'
|
gitea_fqdn: 'git.{{ domain }}'
|
||||||
gitea_home: '/var/lib/gitea'
|
gitea_home: '/var/lib/gitea'
|
||||||
gitea_db_type: 'sqlite3'
|
gitea_db_type: 'sqlite3'
|
||||||
gitea_theme_default: 'arc-green'
|
gitea_theme_default: 'gitea-dark'
|
||||||
gitea_root_url: 'https://git.{{ domain }}'
|
gitea_root_url: 'https://git.{{ domain }}'
|
||||||
gitea_protocol: http
|
gitea_protocol: http
|
||||||
gitea_http_port: "{{ giteaPort }}"
|
gitea_http_port: "{{ giteaPort }}"
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
gitea_allow_only_internal_registration: true
|
gitea_allow_only_internal_registration: true
|
||||||
gitea_disable_registration: true
|
gitea_disable_registration: true
|
||||||
gitea_require_signin: false
|
gitea_require_signin: false
|
||||||
|
gitea_lfs_server_enabled: true
|
||||||
|
|
||||||
- name: Backup db
|
- name: Backup db
|
||||||
include_tasks: backup.yml
|
include_tasks: backup.yml
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
- name: Install repositories
|
- name: Install repositories
|
||||||
copy:
|
copy:
|
||||||
src: /etc/gitea/gitea-dump/repos/
|
src: /etc/gitea/gitea-dump/repos/
|
||||||
dest: /var/lib/gitea/gitea-repositories/
|
dest: /var/lib/gitea/repos/
|
||||||
remote_src: true
|
remote_src: true
|
||||||
owner: gitea
|
owner: gitea
|
||||||
tags: restore
|
tags: restore
|
||||||
|
|||||||
@@ -20,13 +20,14 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: geerlingguy.nginx
|
name: geerlingguy.nginx
|
||||||
vars:
|
vars:
|
||||||
nginx_listen_ipv6: true
|
nginx_listen_ipv6: false
|
||||||
nginx_vhosts:
|
nginx_vhosts:
|
||||||
- listen: "443 ssl http2"
|
- listen: "443 ssl http2"
|
||||||
server_name: "{{ domain }}"
|
server_name: "{{ domain }}"
|
||||||
root: "/var/www/{{ domain }}/public"
|
root: "/var/www/{{ domain }}/public"
|
||||||
index: "index.html index.htm"
|
index: "index.html index.htm"
|
||||||
extra_parameters: |
|
extra_parameters: |
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
location / {
|
location / {
|
||||||
add_header Permissions-Policy interest-cohort=();
|
add_header Permissions-Policy interest-cohort=();
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
@@ -35,19 +36,36 @@
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
||||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
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"
|
- listen: "443 ssl http2"
|
||||||
server_name: "git.{{ domain }}"
|
server_name: "git.{{ domain }}"
|
||||||
client_max_body_size: "100M"
|
client_max_body_size: "512M"
|
||||||
extra_parameters: |
|
extra_parameters: |
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
location / {
|
location / {
|
||||||
add_header Permissions-Policy interest-cohort=();
|
add_header Permissions-Policy interest-cohort=();
|
||||||
proxy_pass http://localhost:{{ giteaPort }};
|
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 /etc/letsencrypt/live/{{ domain }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ domain }}/privkey.pem;
|
||||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
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 }}"
|
server_name: "{{ onionDomain }}"
|
||||||
root: "/var/www/{{ domain }}/tor"
|
root: "/var/www/{{ domain }}/tor"
|
||||||
index: "index.html index.htm"
|
index: "index.html index.htm"
|
||||||
|
|||||||
Reference in New Issue
Block a user