Compare commits
2 Commits
79e1cdd5bc
...
150efee902
Author | SHA1 | Date | |
---|---|---|---|
150efee902 | |||
4b90ca5262 |
@ -5,9 +5,9 @@
|
||||
- host_vars/proxy.yml
|
||||
roles:
|
||||
- base
|
||||
- mariadb
|
||||
# - mariadb
|
||||
- proxy
|
||||
- docker
|
||||
- gitea
|
||||
- bitwarden
|
||||
# - docker
|
||||
# - gitea
|
||||
# - bitwarden
|
||||
- kutt
|
||||
|
15
roles/kutt/defaults/main.yml
Normal file
15
roles/kutt/defaults/main.yml
Normal file
@ -0,0 +1,15 @@
|
||||
# container settings
|
||||
kutt_name: kutt
|
||||
kutt_webport: 3030
|
||||
kutt_web: "127.0.0.1:{{ kutt_webport }}"
|
||||
|
||||
# database settings
|
||||
kutt_dbname: "{{ kutt_name }}"
|
||||
kutt_dbuser: "{{ kutt_name }}"
|
||||
kutt_postgres_volume: postgres_data
|
||||
|
||||
# redis
|
||||
kutt_redis_volume: redis_data
|
||||
|
||||
# host
|
||||
kutt_root: "{{ docker_compose_root }}/{{ kutt_name }}"
|
@ -14,3 +14,9 @@
|
||||
src: compose-env.j2
|
||||
dest: "{{ kutt_root }}/.env"
|
||||
notify: restart_kutt
|
||||
|
||||
- name: Start and enable Gitea service
|
||||
service:
|
||||
name: "{{ docker_compose_service }}@{{ kutt_name }}"
|
||||
state: started
|
||||
enabled: true
|
||||
|
11
roles/kutt/templates/compose-env.j2
Normal file
11
roles/kutt/templates/compose-env.j2
Normal file
@ -0,0 +1,11 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
kutt_version={{ kutt_version }}
|
||||
kutt_name={{ kutt_name }}
|
||||
kutt_web={{ kutt_web }}
|
||||
kutt_dbname={{ kutt_dbname }}
|
||||
kutt_dbuser={{ kutt_dbuser }}
|
||||
kutt_dbpass={{ kutt_dbpass }}
|
||||
kutt_redis_version={{ kutt_redis_version }}
|
||||
kutt_postgres_version={{ kutt_postgres_version }}
|
||||
kutt_postgres_volume={{ kutt_postgres_volume }}
|
@ -2,35 +2,35 @@ version: "3.7"
|
||||
|
||||
services:
|
||||
kutt:
|
||||
image: kutt/kutt:${kutt_version:-latest}
|
||||
container_name: ${kutt_name:-kutt}
|
||||
image: kutt/kutt:${kutt_version}
|
||||
container_name: ${kutt_name}
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
|
||||
ports:
|
||||
- ${kutt_web:-3000}:3000
|
||||
- ${kutt_web}:3000
|
||||
environment:
|
||||
DB_HOST: ${kutt_dbhost:-postgres}
|
||||
DB_NAME: ${kutt_dbname:-kutt}
|
||||
DB_USER: ${kutt_dbuser:-kutt}
|
||||
DB_HOST: postgres
|
||||
DB_NAME: ${kutt_dbname}
|
||||
DB_USER: ${kutt_dbuser}
|
||||
DB_PASSWORD: ${kutt_dbpass}
|
||||
REDIS_HOST: ${kutt_redis:-redis}
|
||||
REDIS_HOST: redis
|
||||
|
||||
redis:
|
||||
image: redis:${redis_version:-6.0-alpine}
|
||||
image: redis:${kutt_redis_version}
|
||||
volumes:
|
||||
- {{ redis_volume }}:/data
|
||||
- {{ kutt_redis_volume }}:/data
|
||||
|
||||
postgres:
|
||||
image: postgres:${postgres_version:-12-alpine}
|
||||
image: postgres:${kutt_postgres_version}
|
||||
environment:
|
||||
POSTGRES_USER: ${kutt_dbuser:-kutt}
|
||||
POSTGRES_USER: ${kutt_dbuser}
|
||||
POSTGRES_PASSWORD: ${kutt_dbpass}
|
||||
POSTGRES_DB: ${kutt_dbhost:-postgres}
|
||||
POSTGRES_DB: ${kutt_dbname}
|
||||
volumes:
|
||||
- {{ postgres_volume }}:/var/lib/postgresql/data
|
||||
- {{ kutt_postgres_volume }}:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
{{ redis_volume }}:
|
||||
{{ postgres_volume }}:
|
||||
{{ kutt_redis_volume }}:
|
||||
{{ kutt_postgres_volume }}:
|
||||
|
Loading…
Reference in New Issue
Block a user