31 lines
950 B
YAML
31 lines
950 B
YAML
- name: Deploy Forgejo
|
|
ansible.builtin.import_role:
|
|
name: compose-service
|
|
vars:
|
|
docker_volumes:
|
|
- '{{ data_directory }}:/data'
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
docker_env:
|
|
USER_UID: '{{ getent_passwd[service_user].1 }}'
|
|
USER_GID: '{{ getent_passwd[service_user].2 }}'
|
|
FORGEJO__server__SSH_PORT: '{{ public_ssh_port }}'
|
|
FORGEJO__openid__ENABLE_OPENID_SIGNIN: false
|
|
FORGEJO__openid__ENABLE_OPENID_SIGNUP: false
|
|
docker_ports:
|
|
- "{{ public_ssh_port }}:22"
|
|
use_docker_user: false
|
|
|
|
- name: Ensure data directory exists
|
|
ansible.builtin.file:
|
|
path: '{{ data_directory }}'
|
|
state: directory
|
|
owner: '{{ service_user }}'
|
|
group: '{{ service_user }}'
|
|
mode: '700'
|
|
|
|
|
|
- name: Deploy Caddyfile for Forgejo
|
|
vars:
|
|
docker_http_port: 3000
|
|
ansible.builtin.import_tasks: ../../common/tasks/create_caddyfile_for_compose-service.yml
|