Compare commits
3 Commits
4cfe4deb83
...
4b855cf936
| Author | SHA1 | Date |
|---|---|---|
|
|
4b855cf936 | 2 years ago |
|
|
a8bb27161d | 2 years ago |
|
|
b151a66c85 | 2 years ago |
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
mariadb_portainer_stack_name: mariadb
|
||||||
|
mariadb_state: present
|
||||||
|
mariadb_image: mariadb
|
||||||
|
mariadb_tag: 10.8.3
|
||||||
|
mariadb_container_name: mariadb
|
||||||
|
mariadb_expose_port: 3306
|
||||||
|
mariadb_network: mariadb_net
|
||||||
|
|
||||||
|
adminer_container_name: adminer
|
||||||
|
adminer_image: adminer
|
||||||
|
adminer_tag: latest
|
||||||
|
adminer_expose_port: 3307
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
---
|
||||||
|
- name: Mariadb | Create docker network.
|
||||||
|
docker_network:
|
||||||
|
name: '{{ mariadb_network }}'
|
||||||
|
|
||||||
|
- name: "Mariadb | Restore any missing volumes from S3"
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: chatton.docker_backup.docker_s3_volume_restore
|
||||||
|
vars:
|
||||||
|
docker_backup_s3_volume: "{{ item }}"
|
||||||
|
with_items:
|
||||||
|
- name: "{{ mariadb_portainer_stack_name }}_data"
|
||||||
|
- name: "{{ mariadb_portainer_stack_name }}_config"
|
||||||
|
|
||||||
|
- name: "Mariadb | Update Portainer."
|
||||||
|
chatton.portainer.portainer_stack:
|
||||||
|
username: '{{ portainer_user }}'
|
||||||
|
password: '{{ portainer.password }}'
|
||||||
|
base_url: '{{ portainer_base_url }}'
|
||||||
|
stack_name: '{{ mariadb_portainer_stack_name }}'
|
||||||
|
endpoint_id: '{{ portainer_endpoint }}'
|
||||||
|
state: "{{ mariadb_state }}"
|
||||||
|
definition:
|
||||||
|
version: '3.1'
|
||||||
|
services:
|
||||||
|
mariadb:
|
||||||
|
labels: "{{ backup_labels }}"
|
||||||
|
container_name: "{{ mariadb_container_name }}"
|
||||||
|
image: "{{ mariadb_image }}:{{ mariadb_tag }}"
|
||||||
|
hostname: mariadb
|
||||||
|
restart: "{{ restart_policy }}"
|
||||||
|
ports:
|
||||||
|
- "{{ mariadb_expose_port }}:3306"
|
||||||
|
volumes:
|
||||||
|
- data:/var/lib/mysql
|
||||||
|
- config:/etc/mysql/conf.d
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD={{ mariadb.mysql_root_password }}
|
||||||
|
|
||||||
|
adminer:
|
||||||
|
restart: "{{ restart_policy }}"
|
||||||
|
image: "{{ adminer_image }}:{{ adminer_tag }}"
|
||||||
|
environment:
|
||||||
|
ADMINER_DEFAULT_SERVER: mariadb
|
||||||
|
ADMINER_DESIGN: galkaev
|
||||||
|
ports:
|
||||||
|
- "{{ adminer_expose_port }}:8080"
|
||||||
|
volumes:
|
||||||
|
data:
|
||||||
|
config:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: "{{ mariadb_network }}"
|
||||||
|
external: true
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
nextcloud_state: present
|
||||||
|
nextcloud_image: nextcloud
|
||||||
|
nextcloud_tag: 27.0
|
||||||
|
nextcloud_expose_port: 8081
|
||||||
|
nextcloud_container_name: nextcloud
|
||||||
|
nextcloud_portainer_stack_name: nextcloud
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
---
|
||||||
|
- name: Nextcloud | Create docker network.
|
||||||
|
docker_network:
|
||||||
|
name: '{{ mariadb_network }}'
|
||||||
|
|
||||||
|
- name: "Nextcloud | Restore any missing volumes from S3"
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: chatton.docker_backup.docker_s3_volume_restore
|
||||||
|
vars:
|
||||||
|
docker_backup_s3_volume:
|
||||||
|
name: "{{ nextcloud_portainer_stack_name }}_data"
|
||||||
|
|
||||||
|
- name: "Nextcloud | Update Portainer."
|
||||||
|
chatton.portainer.portainer_stack:
|
||||||
|
username: '{{ portainer_user }}'
|
||||||
|
password: '{{ portainer.password }}'
|
||||||
|
base_url: '{{ portainer_base_url }}'
|
||||||
|
stack_name: '{{ nextcloud_portainer_stack_name }}'
|
||||||
|
endpoint_id: '{{ portainer_endpoint }}'
|
||||||
|
state: "{{ nextcloud_state }}"
|
||||||
|
definition:
|
||||||
|
version: '3.2'
|
||||||
|
services:
|
||||||
|
nextcloud:
|
||||||
|
labels: "{{ backup_labels }}"
|
||||||
|
image: "{{ nextcloud_image }}:{{ nextcloud_tag }}"
|
||||||
|
container_name: "{{ nextcloud_container_name }}"
|
||||||
|
restart: "{{ restart_policy }}"
|
||||||
|
ports:
|
||||||
|
- "{{ nextcloud_expose_port }}:80"
|
||||||
|
volumes:
|
||||||
|
- data:/var/www/html
|
||||||
|
volumes:
|
||||||
|
data:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
name: "{{ mariadb_network }}"
|
||||||
|
external: true
|
||||||
Loading…
Reference in New Issue