Install gitea via ansible
This commit is contained in:
parent
675d7a64e8
commit
3aced1fe46
1 changed files with 43 additions and 0 deletions
43
pottwal.yml
43
pottwal.yml
|
@ -14,6 +14,7 @@
|
|||
openhab_configuration_source: https://github.com/netz39/n39-openhab.git
|
||||
openhab_configuration_version: master
|
||||
|
||||
gitea_host_port: 9091
|
||||
uritools_host_port: 8080
|
||||
entities_validation_svc_host_port: 8082
|
||||
shlink_host_port: 8083
|
||||
|
@ -26,6 +27,47 @@
|
|||
- role: apache
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Check if gitea data dir exists
|
||||
ansible.builtin.stat:
|
||||
path: "/srv/data/gitea"
|
||||
register: gitea_dir
|
||||
- name: Fail if gitea data dir does not exist
|
||||
ansible.builtin.fail:
|
||||
msg: "Gitea data dir is missing, please restore from the backup!"
|
||||
when: not gitea_dir.stat.exists
|
||||
|
||||
- name: Setup the docker container for gitea
|
||||
docker_container:
|
||||
name: gitea
|
||||
image: "gitea/gitea:1.15.9"
|
||||
pull: true
|
||||
state: started
|
||||
restart_policy: unless-stopped
|
||||
detach: yes
|
||||
ports:
|
||||
- 127.0.0.1:{{ gitea_host_port }}:3000
|
||||
- 2222:2222
|
||||
env:
|
||||
APP_NAME="Netz39 Gitea"
|
||||
RUN_MODE="prod"
|
||||
SSH_DOMAIN="gitea.n39.eu"
|
||||
SSH_PORT="2222"
|
||||
SSH_START_SERVER="false"
|
||||
ROOT_URL="https://gitea.n39.eu"
|
||||
DISABLE_REGISTRATION="true"
|
||||
USER_UID=1000
|
||||
USER_GID=1000
|
||||
volumes:
|
||||
- "/srv/docker/gitea:/data:rw"
|
||||
|
||||
- name: Setup proxy site gitea.n39.eu
|
||||
include_role:
|
||||
name: setup-http-site-proxy
|
||||
vars:
|
||||
site_name: "gitea.n39.eu"
|
||||
proxy_port: "{{ gitea_host_port }}"
|
||||
|
||||
- name: Ensure apt-cacher container is running
|
||||
docker_container:
|
||||
name: apt_cacher_ng
|
||||
|
@ -37,6 +79,7 @@
|
|||
ports:
|
||||
- 3142:3142
|
||||
|
||||
|
||||
- name: Ensure the mosquitto directories exist
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
|
Loading…
Reference in a new issue