This repository has been archived on 2023-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
max/roles/forgejo/tasks/main.yml
2023-01-07 19:08:49 +01:00

31 lines
742 B
YAML

- name: Create app directory
file:
path: /srv/forgejo
state: directory
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /srv/forgejo/docker-compose.yml
- name: Create data directory
file:
path: /data/forgejo
state: directory
owner: 1000
group: 1000
- name: Copy conf directory
file:
path: /srv/forgejo/conf
state: directory
owner: 1000
group: 1000
- name: Copy app.ini
template:
src: "{{ role_path }}/templates/app.ini"
dest: /srv/forgejo/conf/app.ini
register: config
- name: Start the Docker Compose
docker_compose:
project_src: /srv/forgejo
pull: true
remove_orphans: true
restarted: "{{ config.changed }}"