Compare commits

..

2 Commits

3 changed files with 9 additions and 9 deletions

View File

@ -83,7 +83,7 @@
- reverse-proxy
- mysqlnet
ports:
- 2223:22/tcp
- 2222:22/tcp
volume:
- /mnt/volumes/gitea_data/data:/data:Z
env:
@ -110,7 +110,7 @@
- name: Add git.{{ DOMAIN }} to /etc/hosts
ansible.builtin.lineinfile:
path: "/etc/hosts"
line: "127.0.0.1 git2.{{ DOMAIN }} git2"
line: "127.0.0.1 git.{{ DOMAIN }} git"
become: true
- name: Check if lets encrypt certificate installation is already done
@ -142,14 +142,14 @@
- name: Install lets encrypt certificate
containers.podman.podman_container_exec:
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
when: not gitea_certificate_flag.stat.exists
- name: Allow git SSH port
ansible.posix.firewalld:
zone: public
port: 2223/tcp
port: 2222/tcp
permanent: true
immediate: true
state: enabled

View File

@ -1,5 +1,5 @@
<VirtualHost *:80>
ServerName gitea.{{ DOMAIN }}
ServerName git.{{ DOMAIN }}
ServerAdmin postmaster@{{ DOMAIN }}
ProxyPreserveHost on
ProxyPass / http://gitea:3000/

View File

@ -135,10 +135,10 @@
# Workaround to prevent unexplained 503 error from reverse-proxy
# after registry container restart
- name: Restart reverse-proxy container service
ansible.builtin.systemd:
name: container-reverse-proxy
state: restarted
- name: Reload reverse-proxy configuration
containers.podman.podman_container_exec:
name: reverse-proxy
command: 'sh -c ''service apache2 reload'''
become: true
- name: Add cloud.{{ DOMAIN }} to /etc/hosts