roles/containers: make gitea bridge network instead of host network
This commit is contained in:
parent
167c01c04e
commit
ff40949ff7
@ -17,6 +17,19 @@
|
||||
register: user_gitea
|
||||
when: '"gitea" in groups'
|
||||
|
||||
- name: Create Syncthing group
|
||||
group:
|
||||
name: vault
|
||||
state: present
|
||||
when: '"syncthing" in groups'
|
||||
|
||||
- name: Create Syncthing user
|
||||
user:
|
||||
name: syncthing
|
||||
group: vault
|
||||
register: user_syncthing
|
||||
when: '"syncthing" in groups'
|
||||
|
||||
- name: Create docker-compose directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ docker_compose_dir }}"
|
||||
|
@ -6,18 +6,17 @@ version: "3"
|
||||
services:
|
||||
{% if "gitea" in group_names %}
|
||||
gitea:
|
||||
network_mode: host
|
||||
container_name: gitea
|
||||
image: gitea/gitea:latest
|
||||
environment:
|
||||
- USER=gitea
|
||||
- USER_UID={{ user_gitea.uid }}
|
||||
- USER_GID={{ user_gitea.group }}
|
||||
- GITEA__server__SSH_PORT=2499
|
||||
- GITEA__server__SSH_LISTEN_PORT=2499
|
||||
- GITEA__service__DISABLE_REGISTRATION=true
|
||||
- GITEA__server__DOMAIN={{ gitea_domain }}
|
||||
- GITEA__server__SSH_DOMAIN={{ gitea_domain }}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "2499:22"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- {{ dataroot }}/gitea:/data
|
||||
|
@ -1,5 +1,5 @@
|
||||
[Match]
|
||||
Name=*
|
||||
Name={{ net_interface }}
|
||||
|
||||
[DHCP]
|
||||
UseDNS=false
|
||||
|
Loading…
Reference in New Issue
Block a user