Compare commits
2 Commits
93deaed324
...
26b35467ec
Author | SHA1 | Date | |
---|---|---|---|
26b35467ec | |||
6aa53bb7ad |
@ -83,7 +83,7 @@
|
|||||||
- reverse-proxy
|
- reverse-proxy
|
||||||
- mysqlnet
|
- mysqlnet
|
||||||
ports:
|
ports:
|
||||||
- 2223:22/tcp
|
- 2222:22/tcp
|
||||||
volume:
|
volume:
|
||||||
- /mnt/volumes/gitea_data/data:/data:Z
|
- /mnt/volumes/gitea_data/data:/data:Z
|
||||||
env:
|
env:
|
||||||
@ -110,7 +110,7 @@
|
|||||||
- name: Add git.{{ DOMAIN }} to /etc/hosts
|
- name: Add git.{{ DOMAIN }} to /etc/hosts
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: "/etc/hosts"
|
path: "/etc/hosts"
|
||||||
line: "127.0.0.1 git2.{{ DOMAIN }} git2"
|
line: "127.0.0.1 git.{{ DOMAIN }} git"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Check if lets encrypt certificate installation is already done
|
- name: Check if lets encrypt certificate installation is already done
|
||||||
@ -142,14 +142,14 @@
|
|||||||
- name: Install lets encrypt certificate
|
- name: Install lets encrypt certificate
|
||||||
containers.podman.podman_container_exec:
|
containers.podman.podman_container_exec:
|
||||||
name: reverse-proxy
|
name: reverse-proxy
|
||||||
command: 'sh -c ''certbot --apache -vvv --domains gitea.{{ DOMAIN }} -m {{ recipient_email }} --agree-tos --reinstall --redirect --hsts --non-interactive'''
|
command: 'sh -c ''certbot --apache -vvv --domains git.{{ DOMAIN }} -m {{ recipient_email }} --agree-tos --reinstall --redirect --hsts --non-interactive'''
|
||||||
become: true
|
become: true
|
||||||
when: not gitea_certificate_flag.stat.exists
|
when: not gitea_certificate_flag.stat.exists
|
||||||
|
|
||||||
- name: Allow git SSH port
|
- name: Allow git SSH port
|
||||||
ansible.posix.firewalld:
|
ansible.posix.firewalld:
|
||||||
zone: public
|
zone: public
|
||||||
port: 2223/tcp
|
port: 2222/tcp
|
||||||
permanent: true
|
permanent: true
|
||||||
immediate: true
|
immediate: true
|
||||||
state: enabled
|
state: enabled
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName gitea.{{ DOMAIN }}
|
ServerName git.{{ DOMAIN }}
|
||||||
ServerAdmin postmaster@{{ DOMAIN }}
|
ServerAdmin postmaster@{{ DOMAIN }}
|
||||||
ProxyPreserveHost on
|
ProxyPreserveHost on
|
||||||
ProxyPass / http://gitea:3000/
|
ProxyPass / http://gitea:3000/
|
||||||
|
@ -135,10 +135,10 @@
|
|||||||
|
|
||||||
# Workaround to prevent unexplained 503 error from reverse-proxy
|
# Workaround to prevent unexplained 503 error from reverse-proxy
|
||||||
# after registry container restart
|
# after registry container restart
|
||||||
- name: Restart reverse-proxy container service
|
- name: Reload reverse-proxy configuration
|
||||||
ansible.builtin.systemd:
|
containers.podman.podman_container_exec:
|
||||||
name: container-reverse-proxy
|
name: reverse-proxy
|
||||||
state: restarted
|
command: 'sh -c ''service apache2 reload'''
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Add cloud.{{ DOMAIN }} to /etc/hosts
|
- name: Add cloud.{{ DOMAIN }} to /etc/hosts
|
||||||
|
Loading…
Reference in New Issue
Block a user