-
Notifications
You must be signed in to change notification settings - Fork 2
/
dbservice_container.yaml
45 lines (42 loc) · 1.22 KB
/
dbservice_container.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
- name: Deploy dbservice
hosts: all
become: yes
tasks:
- name: create db storage
file:
path: /var/dbservice/db
state: directory
- include_role:
name: podman_prepare_host
vars:
install_podman: false
install_podman_docker: false
- include_role:
name: podman_systemd_container
vars:
container_name: dbservice-mariadb
image: registry.redhat.io/rhel8/mariadb-103
description: MariaDB service
env:
MYSQL_USER: user
MYSQL_PASSWORD: pass
MYSQL_DATABASE: db
ports:
- '3306:3306'
- '8080:80'
volumes:
- /var/dbservice/db:/var/lib/mysql/data:Z
healthcheck: '/usr/bin/mysql -h localhost -u root -e "show databases;" || exit 1'
healthcheck_interval: 10s
- include_role:
name: podman_systemd_container
vars:
container_name: dbservice-pma
image: phpmyadmin/phpmyadmin
description: phpMyAdmin service
network: container:dbservice-mariadb
env:
PMA_HOST: 127.0.0.1
healthcheck: 'curl http://localhost || exit 1'
healthcheck_interval: 10s
depends_on: dbservice-mariadb