data.coop-ansible/roles/docker/tasks/services/gitea.yml

50 lines
1.1 KiB
YAML
Raw Normal View History

---
- name: gitea network
docker_network:
name: gitea
- name: gitea app volume
docker_volume:
name: gitea
- name: gitea database volume
docker_volume:
name: gitea_db
- name: gitea database container
docker_container:
name: gitea_db
image: postgres:10
state: started
restart_policy: always
networks:
- name: gitea
volumes:
- gitea_db:/var/lib/postgresql/data
env:
POSTGRES_DB: somethingelse
POSTGRES_USER: gitea
POSTGRES_PASSWORD: "{{ postgres_passwords.gitea }}"
- name: gitea container
docker_container:
name: gitea
image: gitea/gitea:latest
restart_policy: always
networks:
- name: gitea
- name: external_services
volumes:
- gitea:/data
published_ports:
- "222:22"
env:
VIRTUAL_HOST: "{{ gitea.domain }}"
LETSENCRYPT_HOST: "{{ gitea.domain }}"
LETSENCRYPT_EMAIL: "{{ letsencrypt_email }}"
POSTGRES_HOST: gitea_db
POSTGRES_DB: gitea
POSTGRES_USER: gitea
POSTGRES_PASSWORD: "{{ postgres_passwords.gitea }}"