Ivan Reshetnikov
9592eb0890
Due to problems with queues and locks, I did not add servers, I just changed the container name and haproxy settings.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
---
|
|
- name: Disable forgejo server in haproxy
|
|
become: true
|
|
community.general.haproxy:
|
|
socket: /run/haproxy/admin.sock
|
|
state: disabled
|
|
backend: forgejo
|
|
host: s{{ server_idx }}
|
|
fail_on_not_found: true
|
|
- name: Create forgejo container
|
|
become: true
|
|
community.docker.docker_container:
|
|
name: forgejo-{{ server_idx }}
|
|
image: codeberg.org/forgejo/forgejo:{{ tag }}
|
|
env:
|
|
USER_UID: "{{ user_uid | string }}"
|
|
USER_GID: "{{ user_gid | string }}"
|
|
FORGEJO_WORK_DIR: "{{ work_path }}"
|
|
FORGEJO_CUSTOM: "{{ work_path }}/custom"
|
|
networks:
|
|
- name: postgresql
|
|
- name: forgejo
|
|
- name: minio
|
|
- name: haproxy
|
|
volumes:
|
|
- forgejo:/data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
recreate: "{{ appini.changed }}"
|
|
restart_policy: unless-stopped
|
|
- name: Enable forgejo server in haproxy
|
|
become: true
|
|
community.general.haproxy:
|
|
socket: /run/haproxy/admin.sock
|
|
state: enabled
|
|
backend: forgejo
|
|
host: s{{ server_idx }}
|
|
fail_on_not_found: true
|