Compare commits

..

2 Commits

Author SHA1 Message Date
150efee902 testing 2022-10-22 22:57:14 -04:00
4b90ca5262 testing 2022-10-22 22:56:35 -04:00
5 changed files with 51 additions and 19 deletions

View File

@ -5,9 +5,9 @@
- host_vars/proxy.yml - host_vars/proxy.yml
roles: roles:
- base - base
- mariadb # - mariadb
- proxy - proxy
- docker # - docker
- gitea # - gitea
- bitwarden # - bitwarden
- kutt - kutt

View 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 }}"

View File

@ -14,3 +14,9 @@
src: compose-env.j2 src: compose-env.j2
dest: "{{ kutt_root }}/.env" dest: "{{ kutt_root }}/.env"
notify: restart_kutt notify: restart_kutt
- name: Start and enable Gitea service
service:
name: "{{ docker_compose_service }}@{{ kutt_name }}"
state: started
enabled: true

View 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 }}

View File

@ -2,35 +2,35 @@ version: "3.7"
services: services:
kutt: kutt:
image: kutt/kutt:${kutt_version:-latest} image: kutt/kutt:${kutt_version}
container_name: ${kutt_name:-kutt} container_name: ${kutt_name}
depends_on: depends_on:
- postgres - postgres
- redis - redis
command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"] command: ["./wait-for-it.sh", "postgres:5432", "--", "npm", "start"]
ports: ports:
- ${kutt_web:-3000}:3000 - ${kutt_web}:3000
environment: environment:
DB_HOST: ${kutt_dbhost:-postgres} DB_HOST: postgres
DB_NAME: ${kutt_dbname:-kutt} DB_NAME: ${kutt_dbname}
DB_USER: ${kutt_dbuser:-kutt} DB_USER: ${kutt_dbuser}
DB_PASSWORD: ${kutt_dbpass} DB_PASSWORD: ${kutt_dbpass}
REDIS_HOST: ${kutt_redis:-redis} REDIS_HOST: redis
redis: redis:
image: redis:${redis_version:-6.0-alpine} image: redis:${kutt_redis_version}
volumes: volumes:
- {{ redis_volume }}:/data - {{ kutt_redis_volume }}:/data
postgres: postgres:
image: postgres:${postgres_version:-12-alpine} image: postgres:${kutt_postgres_version}
environment: environment:
POSTGRES_USER: ${kutt_dbuser:-kutt} POSTGRES_USER: ${kutt_dbuser}
POSTGRES_PASSWORD: ${kutt_dbpass} POSTGRES_PASSWORD: ${kutt_dbpass}
POSTGRES_DB: ${kutt_dbhost:-postgres} POSTGRES_DB: ${kutt_dbname}
volumes: volumes:
- {{ postgres_volume }}:/var/lib/postgresql/data - {{ kutt_postgres_volume }}:/var/lib/postgresql/data
volumes: volumes:
{{ redis_volume }}: {{ kutt_redis_volume }}:
{{ postgres_volume }}: {{ kutt_postgres_volume }}: