Browse Source

update my services

master
Markus Bergholz 3 months ago
parent
commit
546ec67fab
7 changed files with 31 additions and 28 deletions
  1. +1
    -1
      ansible/roles/services/tasks/fluentd.yml
  2. +9
    -3
      ansible/roles/services/tasks/gitea.yml
  3. +5
    -13
      ansible/roles/services/tasks/main.yml
  4. +1
    -1
      ansible/roles/services/tasks/mariadb_reader.yml
  5. +6
    -3
      ansible/roles/services/tasks/mariadb_writer.yml
  6. +2
    -2
      ansible/roles/services/tasks/nextcloud.yml
  7. +7
    -5
      ansible/roles/services/tasks/proxysql.yml

+ 1
- 1
ansible/roles/services/tasks/fluentd.yml View File

@@ -4,7 +4,7 @@
name: fluentd
image: markuman/fluentd:3
mounts:
- source: /home/m/fluentd/
- source: /home/m/DOCKER_DATA/fluentd/
target: /fluent/
type: bind
- source: /home/m/.aws/

+ 9
- 3
ansible/roles/services/tasks/gitea.yml View File

@@ -1,16 +1,22 @@
- name: nextcloud
- name: gitea
docker_swarm_service:
name: gitea
image: gitea/gitea:1.9.1
mounts:
- source: /home/m/gitea/data/
- source: /home/m/DOCKER_DATA/gitea/
target: /data/
type: bind
env:
- "MYSQL_HOST=mariadb"
- "MYSQL_USER=gitea"
- "MYSQL_PASSWORD={{ gitea_db_password }}"
- "MYSQL_PASSWORD=gitea"
- "MYSQL_DATABASE=gitea"
networks:
- "db"
- "public"
publish:
- published_port: 222
target_port: 22
placement:
constraints:
- node.role == manager

+ 5
- 13
ansible/roles/services/tasks/main.yml View File

@@ -1,15 +1,7 @@
---
- name: prepare my docker environment
become: yes
become_method: sudo

block:
- include_tasks: fluentd.yml
- include_tasks: mariadb_writer.yml
- include_tasks: mariadb_reader.yml
- include_tasks: proxysql.yml
- include_tasks: nextcloud.yml
- include_tasks: gitea.yml

---
- include_tasks: mariadb_writer.yml
#- include_tasks: mariadb_reader.yml
#- include_tasks: proxysql.yml
- include_tasks: nextcloud.yml
- include_tasks: gitea.yml


+ 1
- 1
ansible/roles/services/tasks/mariadb_reader.yml View File

@@ -3,7 +3,7 @@
name: mariadb_reader
image: markuman/mariadb:alpine-10.3.17
mounts:
- source: /home/m/newdb/
- source: /home/m/DOCKER_DATA/mariadb_replica
target: /var/lib/mysql/
type: bind
env:

+ 6
- 3
ansible/roles/services/tasks/mariadb_writer.yml View File

@@ -1,13 +1,16 @@
- name: nextcloud
- name: mariadb writer
docker_swarm_service:
name: mariadb_writer
name: mariadb
image: markuman/mariadb:alpine-10.3.17
mounts:
- source: /home/m/newdb/
- source: /home/m/DOCKER_DATA/mariadb/
target: /var/lib/mysql/
type: bind
networks:
- "db"
publish:
- published_port: 3306
target_port: 3306
placement:
constraints:
- node.role == manager

+ 2
- 2
ansible/roles/services/tasks/nextcloud.yml View File

@@ -3,13 +3,13 @@
name: nextcloud
image: home:16.0.4.0
mounts:
- source: /home/m/nextcloud/
- source: /home/m/DOCKER_DATA/nextcloud/
target: /var/www/html/
type: bind
env:
- "MYSQL_HOST=mariadb"
- "MYSQL_USER=nextcloud"
- "MYSQL_PASSWORD={{ nextcloud_db_password }}"
- "MYSQL_PASSWORD=nextcloud"
- "MYSQL_DATABASE=nextcloud"
networks:
- "db"

+ 7
- 5
ansible/roles/services/tasks/proxysql.yml View File

@@ -1,15 +1,17 @@
- name: nextcloud
docker_swarm_service:
name: mariadb
image: markuman/proxysql:2.0.6
image: markuman/proxysql:2.0.6.2
env:
- "gitea_user=gitea"
- "gitea_password={{ gitea_db_password }}"
- "nextcloud_user=nextcloud"
- "nextcloud_password={{ nextcloud_db_password }}"
- "gitea_password=gitea"
- "nextcloud_password=nextcloud"
- "WRITER_HOSTGROUP=0"
- "READER_HOSTGROUP=1"
- "WRITER_HOST=mariadb_writer"
- "READER_HOST=mariadb_reader"
networks:
- "db"
publish:
- published_port: 3306
target_port: 6033
mode: global

Loading…
Cancel
Save