Add webdis to ansible
This commit is contained in:
parent
afe85702a6
commit
24ca76cd60
6 changed files with 42 additions and 29 deletions
_ansible
|
@ -12,4 +12,5 @@
|
|||
- umami
|
||||
- uptime-kuma
|
||||
- watchtower
|
||||
- webdis
|
||||
- wiki-js
|
||||
|
|
31
_ansible/roles/webdis/files/webdis.json
Normal file
31
_ansible/roles/webdis/files/webdis.json
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"redis_host": "redis",
|
||||
|
||||
"redis_port": 6379,
|
||||
"redis_auth": null,
|
||||
|
||||
"http_host": "0.0.0.0",
|
||||
"http_port": 7379,
|
||||
|
||||
"threads": 5,
|
||||
"pool_size": 20,
|
||||
|
||||
"daemonize": false,
|
||||
"websockets": false,
|
||||
|
||||
"database": 0,
|
||||
|
||||
"acl": [
|
||||
{
|
||||
"disabled": ["DEBUG"]
|
||||
},
|
||||
|
||||
{
|
||||
"http_basic_auth": "user:password",
|
||||
"enabled": ["DEBUG"]
|
||||
}
|
||||
],
|
||||
|
||||
"verbosity": 4,
|
||||
"logfile": "/dev/stderr"
|
||||
}
|
14
_ansible/roles/webdis/tasks/main.yml
Normal file
14
_ansible/roles/webdis/tasks/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: Deploy {{ svc.name }}
|
||||
tags:
|
||||
- webdis
|
||||
block:
|
||||
- import_tasks: steps/create-service-directory.yml
|
||||
|
||||
- name: Copy the config
|
||||
ansible.builtin.copy:
|
||||
src: webdis.json
|
||||
dest: "{{ (service_path, 'webdis.json') | path_join }}"
|
||||
mode: '0755'
|
||||
|
||||
- import_tasks: deploy-common-service.yml
|
25
_ansible/roles/webdis/vars/main.yml
Normal file
25
_ansible/roles/webdis/vars/main.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
svc:
|
||||
name: webdis
|
||||
domain: "webdis.huck.serguzim.me"
|
||||
port: 7379
|
||||
|
||||
compose:
|
||||
watchtower: true
|
||||
image: nicolas/webdis
|
||||
volumes:
|
||||
- ./webdis.json:/config/webdis.json
|
||||
file:
|
||||
services:
|
||||
app:
|
||||
command: /usr/local/bin/webdis /config/webdis.json
|
||||
depends_on:
|
||||
- redis
|
||||
redis:
|
||||
image: redis:6.2.6
|
||||
restart: always
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
networks:
|
||||
local-net:
|
||||
networks:
|
||||
local-net:
|
Reference in a new issue