Use host network for gitea container.
This commit is contained in:
parent
1697c11dc1
commit
fbd8530fce
@ -4,4 +4,4 @@
|
|||||||
# uses the hosts file from the container image or "none" which means
|
# uses the hosts file from the container image or "none" which means
|
||||||
# no base hosts file is used. The default is "" which will use /etc/hosts.
|
# no base hosts file is used. The default is "" which will use /etc/hosts.
|
||||||
|
|
||||||
base_hosts_file = "none"
|
#base_hosts_file = "none"
|
||||||
|
@ -80,10 +80,7 @@
|
|||||||
image: docker.io/gitea/gitea:1.22.3
|
image: docker.io/gitea/gitea:1.22.3
|
||||||
state: present
|
state: present
|
||||||
network:
|
network:
|
||||||
- reverse-proxy
|
- host
|
||||||
- mysqlnet
|
|
||||||
ports:
|
|
||||||
- 2222:22/tcp
|
|
||||||
volume:
|
volume:
|
||||||
- /mnt/volumes/gitea_data/data:/data:Z
|
- /mnt/volumes/gitea_data/data:/data:Z
|
||||||
env:
|
env:
|
||||||
@ -94,7 +91,6 @@
|
|||||||
GITEA__database__NAME: "gitea"
|
GITEA__database__NAME: "gitea"
|
||||||
GITEA__database__USER: "gitea"
|
GITEA__database__USER: "gitea"
|
||||||
GITEA__database__PASSWD: "{{ gitea_db_password }}"
|
GITEA__database__PASSWD: "{{ gitea_db_password }}"
|
||||||
dns_search: "{{ SHORTNAME }}-sub.{{ DOMAIN }}"
|
|
||||||
generate_systemd:
|
generate_systemd:
|
||||||
path: /etc/systemd/system
|
path: /etc/systemd/system
|
||||||
become: true
|
become: true
|
||||||
|
@ -98,3 +98,9 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
become: true
|
||||||
when: create_mysql_container is changed
|
when: create_mysql_container is changed
|
||||||
|
|
||||||
|
- name: Add mysql-server.{{ DOMAIN }} to /etc/hosts
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "/etc/hosts"
|
||||||
|
line: "127.0.0.1 mysql-server.{{ DOMAIN }} mysql-server"
|
||||||
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user