This commit is contained in:
11
roles/gitea/templates/etc/systemd/system/gitea.service.j2
Normal file
11
roles/gitea/templates/etc/systemd/system/gitea.service.j2
Normal file
@@ -0,0 +1,11 @@
|
||||
# {{ ansible_managed }}
|
||||
[Unit]
|
||||
Description=gitea
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
ExecStart=/usr/local/bin/docker-compose -f "{{ gitea_docker_compose_directory }}/docker-compose.yml" up
|
||||
ExecStop=/usr/local/bin/docker-compose -f "{{ gitea_docker_compose_directory }}/docker-compose.yml" stop
|
||||
|
||||
[Install]
|
||||
WantedBy=local.target
|
||||
29
roles/gitea/templates/opt/gitea/docker-compose.yml.j2
Normal file
29
roles/gitea/templates/opt/gitea/docker-compose.yml.j2
Normal file
@@ -0,0 +1,29 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
version: '3.2'
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:{{ gitea_version }}
|
||||
environment:
|
||||
- ROOT_URL="http://{{ gitea_url }}"
|
||||
- DISABLE_SSH=true
|
||||
- DISABLE_REGISTRATION=true
|
||||
- REQUIRE_SIGNIN_VIEW=true
|
||||
restart: always
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=traefik_network
|
||||
- traefik.backend=gitea
|
||||
- traefik.port=3000
|
||||
- traefik.frontend.rule=Host:{{ gitea_url }}
|
||||
networks:
|
||||
- traefik_network
|
||||
volumes:
|
||||
- gitea:/data
|
||||
volumes:
|
||||
gitea:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
traefik_network:
|
||||
external: true
|
||||
Reference in New Issue
Block a user