mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Implemented helper role docker-central-database and refactored code
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
---
|
||||
- name: "include docker/compose/database.yml"
|
||||
include_tasks: docker/compose/database.yml
|
||||
- name: "include docker-central-database"
|
||||
include_role:
|
||||
name: docker-central-database
|
||||
|
||||
- name: "include create-domains.yml"
|
||||
include_tasks: create-domains.yml
|
||||
@@ -9,13 +10,13 @@
|
||||
loop_var: domain
|
||||
|
||||
- name: copy docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose_instance_directory}}docker-compose.yml
|
||||
template: src=docker-compose.yml.j2 dest={{docker_compose.directories.instance}}docker-compose.yml
|
||||
notify: docker compose project setup
|
||||
|
||||
- name: copy configuration
|
||||
template:
|
||||
src: .env.production.j2
|
||||
dest: "{{docker_compose_instance_directory}}.env.production"
|
||||
dest: "{{docker_compose.directories.instance}}.env.production"
|
||||
notify: docker compose project setup
|
||||
|
||||
- name: flush docker service
|
||||
@@ -25,5 +26,5 @@
|
||||
- name: setup routine for mastodon
|
||||
command:
|
||||
cmd: "docker-compose run --rm web bundle exec rails db:migrate"
|
||||
chdir: "{{docker_compose_instance_directory}}"
|
||||
chdir: "{{docker_compose.directories.instance}}"
|
||||
when: mode_setup |bool
|
@@ -2,7 +2,7 @@ services:
|
||||
|
||||
{% include 'templates/docker/services/redis.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker/services/' + database_type + '.yml.j2' %}
|
||||
{% include 'roles/docker-central-database/templates/services/' + database_type + '.yml.j2' %}
|
||||
|
||||
web:
|
||||
image: ghcr.io/mastodon/mastodon:{{applications.mastodon.version}}
|
||||
|
Reference in New Issue
Block a user