homelab/roles/comfycamp/tasks/start_server.yml

33 lines
894 B
YAML

---
- name: Disable server in haproxy
become: true
community.general.haproxy:
socket: /run/haproxy/admin.sock
state: disabled
drain: true
wait: true
backend: comfycamp
host: s{{ server_idx }}
fail_on_not_found: true
- name: Create comfycamp container
become: true
community.docker.docker_container:
name: comfycamp-{{ server_idx }}
image: git.comfycamp.space/lumin/comfycamp:v2.3.1
networks:
- name: postgresql
- name: haproxy
volumes:
- /etc/comfycamp/config.local.toml:/usr/src/comfycamp/config.local.toml:ro
- comfycamp:/var/lib/comfycamp
env:
RUST_LOG: warn
restart_policy: unless-stopped
- name: Enable server in haproxy
become: true
community.general.haproxy:
socket: /run/haproxy/admin.sock
state: enabled
backend: comfycamp
host: s{{ server_idx }}
fail_on_not_found: true