forked from linux/WebHosting
64 lines
2.0 KiB
YAML
64 lines
2.0 KiB
YAML
# Included by ../../docker-compose.yaml; use the root Compose entrypoint.
|
|
services:
|
|
# Ritter Tom <tom.ritter@psi.ch>
|
|
# It-Strategy monitoring dashboard
|
|
|
|
it-strategy-dashboard-frontend:
|
|
image: gitea.psi.ch/9501/it-strategy-dashboard-frontend:4.0.4
|
|
container_name: it-strategy-dashboard-frontend
|
|
command: ["sh", "-c", "/usr/local/bin/copyData.sh"]
|
|
volumes:
|
|
- /opt/webcontent/it-strategy-dashboard/frontend:/opt/webcontent/it-strategy-dashboard/frontend
|
|
restart: "no"
|
|
networks:
|
|
- it_strategy_dashboard_backend
|
|
|
|
it-strategy-dashboard-backend:
|
|
env_file:
|
|
- path: ${WEBHOSTING_ENV_DIR:-/etc/webhosting}/dashboard/backend.env
|
|
required: true
|
|
format: raw
|
|
image: gitea.psi.ch/9501/it-strategy-dashboard-backend:4.0.5
|
|
container_name: it-strategy-dashboard-backend
|
|
restart: always
|
|
environment:
|
|
- DB_HOST=it-strategy-dashboard-db
|
|
- DB_PORT=3306
|
|
- DB_NAME=itstrategy
|
|
depends_on:
|
|
it-strategy-dashboard-db:
|
|
condition: service_healthy
|
|
networks:
|
|
- it_strategy_dashboard_backend
|
|
- backend
|
|
|
|
it-strategy-dashboard-db:
|
|
env_file:
|
|
- path: ${WEBHOSTING_ENV_DIR:-/etc/webhosting}/dashboard/db.env
|
|
required: true
|
|
format: raw
|
|
image: mariadb:12
|
|
container_name: it-strategy-dashboard-db
|
|
restart: always
|
|
environment:
|
|
- MYSQL_DATABASE=itstrategy
|
|
volumes:
|
|
- /opt/webcontent/it-strategy-dashboard/mysql/data:/var/lib/mysql
|
|
depends_on:
|
|
it-strategy-dashboard-frontend:
|
|
condition: service_completed_successfully
|
|
networks:
|
|
- it_strategy_dashboard_backend
|
|
healthcheck:
|
|
# Authenticate over TCP; do not embed the password in the command arguments.
|
|
test:
|
|
- CMD-SHELL
|
|
- >-
|
|
MYSQL_PWD="$${MYSQL_PASSWORD}" mariadb --protocol=TCP
|
|
-h 127.0.0.1 -u "$${MYSQL_USER}" "$${MYSQL_DATABASE}"
|
|
-e 'SELECT 1' >/dev/null
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|