remove underscore from container names.
This commit is contained in:
parent
fad4a7cf6e
commit
81af237052
104
src/octojoom
104
src/octojoom
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# The most recent program version.
|
||||
_VERSION="3.4.3"
|
||||
_VERSION="3.4.4"
|
||||
_V="3.4"
|
||||
|
||||
# The program full name
|
||||
@ -358,22 +358,22 @@ function joomla__TRuST__setup() {
|
||||
setSecureCloudflareState
|
||||
# add joomla labels
|
||||
if $VDM_SECURE_CLOUDFLARE; then
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.entrypoints=web\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.entrypoints=web\"")
|
||||
else
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
fi
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.service=joomla_${VDM_KEY}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.joomla_${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.service=joomla${VDM_KEY}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.joomla${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
# add phpmyadmin labels
|
||||
if $VDM_SECURE_CLOUDFLARE; then
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.entrypoints=web\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.entrypoints=web\"")
|
||||
else
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
fi
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.service=phpmyadmin_${VDM_KEY}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.phpmyadmin_${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.service=phpmyadmin${VDM_KEY}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.phpmyadmin${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
else
|
||||
VDM_REMOVE_SECURE="#"
|
||||
VDM_ENTRY_POINT="web"
|
||||
@ -465,27 +465,27 @@ function joomla__TRuST__setup() {
|
||||
# ask if we should add mailcatcher
|
||||
if (whiptail --yesno "Would you also like to enable mailcatcher for these ${VDM_CONTAINER_TYPE^} containers" \
|
||||
--defaultno --title "Enable Mailcatcher" --backtitle "${BACK_TITLE}" 8 112); then
|
||||
VDM_EXTRA_CONTAINER_STUFF=$(getYMLine1 "mailcatcher_${VDM_KEY}:")
|
||||
VDM_EXTRA_CONTAINER_STUFF=$(getYMLine1 "mailcatcher${VDM_KEY}:")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "image: schickling/mailcatcher")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "container_name: mailcatcher_${VDM_KEY}")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "container_name: mailcatcher${VDM_KEY}")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "restart: unless-stopped")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "networks:")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- traefik")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "labels:")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "# mailcatcher")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.enable=true\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}mail.${VDM_DOMAIN}\`)\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}mail.${VDM_DOMAIN}\`)\"")
|
||||
if $VDM_SECURE; then
|
||||
if $VDM_SECURE_CLOUDFLARE; then
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.entrypoints=web\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.entrypoints=web\"")
|
||||
else
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
fi
|
||||
fi
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.service=mailcatcher_${VDM_KEY}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.services.mailcatcher_${VDM_KEY}.loadbalancer.server.port=1080\"")
|
||||
VDM_EXTRA_JOOMLA_ENV+=$(getYMLine3 "- JOOMLA_SMTP_HOST=mailcatcher_${VDM_KEY}")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.service=mailcatcher${VDM_KEY}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.services.mailcatcher${VDM_KEY}.loadbalancer.server.port=1080\"")
|
||||
VDM_EXTRA_JOOMLA_ENV+=$(getYMLine3 "- JOOMLA_SMTP_HOST=mailcatcher${VDM_KEY}")
|
||||
fi
|
||||
# only if in expert mode set the container user detail id needed
|
||||
if isExpert; then
|
||||
@ -636,9 +636,9 @@ function joomlaContainer() {
|
||||
cat <<EOF
|
||||
version: '2'
|
||||
services:
|
||||
mariadb_${VDM_KEY}:
|
||||
mariadb${VDM_KEY}:
|
||||
image: mariadb:latest
|
||||
container_name: mariadb_${VDM_KEY}
|
||||
container_name: mariadb${VDM_KEY}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- MARIADB_DATABASE=\${VDM_${VDM_ENV_KEY^^}_DB}
|
||||
@ -648,40 +648,40 @@ services:
|
||||
volumes:${VDM_DB_VOLUMES_MOUNT}
|
||||
networks:
|
||||
- traefik
|
||||
joomla_${VDM_KEY}:
|
||||
joomla${VDM_KEY}:
|
||||
image: ${VDM_J_REPO}:${VDM_JV}
|
||||
container_name: joomla_${VDM_KEY}
|
||||
container_name: joomla${VDM_KEY}
|
||||
restart: unless-stopped
|
||||
environment:${vdm_container_user}
|
||||
- JOOMLA_DB_HOST=mariadb_${VDM_KEY}:3306
|
||||
- JOOMLA_DB_HOST=mariadb${VDM_KEY}:3306
|
||||
- JOOMLA_DB_NAME=\${VDM_${VDM_ENV_KEY^^}_DB}
|
||||
- JOOMLA_DB_USER=\${VDM_${VDM_ENV_KEY^^}_DB_USER}
|
||||
- JOOMLA_DB_PASSWORD=\${VDM_${VDM_ENV_KEY^^}_DB_PASS}${VDM_EXTRA_JOOMLA_ENV}
|
||||
depends_on:
|
||||
- mariadb_${VDM_KEY}
|
||||
- mariadb${VDM_KEY}
|
||||
volumes:${VDM_JOOMLA_VOLUMES_MOUNT}
|
||||
networks:
|
||||
- traefik
|
||||
labels:
|
||||
# joomla
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.joomla_${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}.${VDM_DOMAIN}\`)"${VDM_JOOMLA_SECURE_LABELS}
|
||||
phpmyadmin_${VDM_KEY}:
|
||||
- "traefik.http.routers.joomla${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}.${VDM_DOMAIN}\`)"${VDM_JOOMLA_SECURE_LABELS}
|
||||
phpmyadmin${VDM_KEY}:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
container_name: phpmyadmin_${VDM_KEY}
|
||||
container_name: phpmyadmin${VDM_KEY}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
PMA_HOST: mariadb_${VDM_KEY}
|
||||
PMA_HOST: mariadb${VDM_KEY}
|
||||
PMA_PORT: 3306
|
||||
UPLOAD_LIMIT: 300M
|
||||
depends_on:
|
||||
- mariadb_${VDM_KEY}
|
||||
- mariadb${VDM_KEY}
|
||||
networks:
|
||||
- traefik
|
||||
labels:
|
||||
# phpmyadmin
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.phpmyadmin_${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}db.${VDM_DOMAIN}\`)"${VDM_PHPMYADMIN_SECURE_LABELS}${VDM_EXTRA_CONTAINER_STUFF}
|
||||
- "traefik.http.routers.phpmyadmin${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}db.${VDM_DOMAIN}\`)"${VDM_PHPMYADMIN_SECURE_LABELS}${VDM_EXTRA_CONTAINER_STUFF}
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
@ -897,27 +897,27 @@ function joomla__TRuST__bulk() {
|
||||
$reset_volume && VDM_VOLUMES=''
|
||||
# add the mailcatcher if needed
|
||||
if $enable_mailcatcher; then
|
||||
VDM_EXTRA_CONTAINER_STUFF=$(getYMLine1 "mailcatcher_${VDM_KEY}:")
|
||||
VDM_EXTRA_CONTAINER_STUFF=$(getYMLine1 "mailcatcher${VDM_KEY}:")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "image: schickling/mailcatcher")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "container_name: mailcatcher_${VDM_KEY}")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "container_name: mailcatcher${VDM_KEY}")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "restart: unless-stopped")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "networks:")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- traefik")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine2 "labels:")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "# mailcatcher")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.enable=true\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}mail.${VDM_DOMAIN}\`)\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.rule=Host(\`${VDM_SUBDOMAIN}mail.${VDM_DOMAIN}\`)\"")
|
||||
if $VDM_SECURE; then
|
||||
if $VDM_SECURE_CLOUDFLARE; then
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.entrypoints=web\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.entrypoints=web\"")
|
||||
else
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
fi
|
||||
fi
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher_${VDM_KEY}.service=mailcatcher_${VDM_KEY}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.services.mailcatcher_${VDM_KEY}.loadbalancer.server.port=1080\"")
|
||||
VDM_EXTRA_JOOMLA_ENV+=$(getYMLine3 "- JOOMLA_SMTP_HOST=mailcatcher_${VDM_KEY}")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.routers.mailcatcher${VDM_KEY}.service=mailcatcher${VDM_KEY}\"")
|
||||
VDM_EXTRA_CONTAINER_STUFF+=$(getYMLine3 "- \"traefik.http.services.mailcatcher${VDM_KEY}.loadbalancer.server.port=1080\"")
|
||||
VDM_EXTRA_JOOMLA_ENV+=$(getYMLine3 "- JOOMLA_SMTP_HOST=mailcatcher${VDM_KEY}")
|
||||
fi
|
||||
# setup letsencrypt stuff
|
||||
VDM_JOOMLA_SECURE_LABELS=''
|
||||
@ -925,22 +925,22 @@ function joomla__TRuST__bulk() {
|
||||
if $VDM_SECURE; then
|
||||
# add joomla labels
|
||||
if $VDM_SECURE_CLOUDFLARE; then
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.entrypoints=web\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.entrypoints=web\"")
|
||||
else
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
fi
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla_${VDM_KEY}.service=joomla_${VDM_KEY}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.joomla_${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.joomla${VDM_KEY}.service=joomla${VDM_KEY}\"")
|
||||
VDM_JOOMLA_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.joomla${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
# add phpmyadmin labels
|
||||
if $VDM_SECURE_CLOUDFLARE; then
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.entrypoints=web\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.entrypoints=web\"")
|
||||
else
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.entrypoints=${VDM_ENTRY_POINT}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.tls.certresolver=vdmresolver\"")
|
||||
fi
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin_${VDM_KEY}.service=phpmyadmin_${VDM_KEY}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.phpmyadmin_${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.routers.phpmyadmin${VDM_KEY}.service=phpmyadmin${VDM_KEY}\"")
|
||||
VDM_PHPMYADMIN_SECURE_LABELS+=$(getYMLine3 "- \"traefik.http.services.phpmyadmin${VDM_KEY}.loadbalancer.server.port=80\"")
|
||||
fi
|
||||
# global
|
||||
export VDM_KEY
|
||||
@ -3183,7 +3183,7 @@ function showJoomlaConfigDetails() {
|
||||
Running the Joomla container for the first time you will need these details:
|
||||
--------------------------------------------------------------------
|
||||
URL: ${VDM_HTTP_SCHEME}${VDM_SUBDOMAIN}.${VDM_DOMAIN}
|
||||
DATABASE_HOST: mariadb_${VDM_KEY}:3306
|
||||
DATABASE_HOST: mariadb${VDM_KEY}:3306
|
||||
--------------------------------------------------------------------
|
||||
VDM_${VDM_ENV_KEY^^}_DB: ${vdm_database_name}
|
||||
VDM_${VDM_ENV_KEY^^}_DB_USER: ${vdm_database_user}
|
||||
|
Loading…
Reference in New Issue
Block a user