Replace gitea DNS name and SSH port.

This commit is contained in:
yohan 2024-11-01 12:33:55 +01:00
parent 93deaed324
commit 6aa53bb7ad
2 changed files with 5 additions and 5 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/