Archived
0
This repository has been archived on 2022-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
project-ctl/ctl.d/11-pma.sh
2022-02-17 13:27:51 +03:00

31 lines
934 B
Bash

#!/bin/bash
# vi: set tabstop=4 shiftwidth=4 expandtab :
M_CONTAINER['name']='tools--phpmyadmin'
M_CONTAINER['title']='phpMyAdmin'
M_CONTAINER['host']=0.0.0.0
M_CONTAINER['port']=9091
MAP_COMMAND['start']=fn_container_start
function fn_container_start {
if [ $(fn_container_check) = 1 ]
then
log "${M_CONTAINER['title']} is runned."
elif [ $(fn_container_check2) = 1 ]
then
log "${M_CONTAINER['title']} container is down. Need restart."
else
log "Start ${M_CONTAINER['title']} container..."
local container_id=$(podman run -d \
--name "${M_CONTAINER['name']}" \
--volume /etc/timezone:/etc/timezone:ro \
--volume /etc/localtime:/etc/localtime:ro \
--publish "${M_CONTAINER['host']}:${M_CONTAINER['port']}:8080" \
--env 'PMA_ARBITRARY=1' \
phpmyadmin:5.1.1-apache
)
log $conainer_id
fi
}