forked from data.coop/ansible
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
|
---
|
||
|
|
||
|
- 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:
|
||
|
- "3000:3000"
|
||
|
- "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 }}"
|