mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-01-18 16:27:25 +01:00
77 lines
2.3 KiB
YAML
77 lines
2.3 KiB
YAML
# Maintainer: Mickael "PAPAMICA" Asseline
|
|
# Update: 2022-05-12
|
|
|
|
#& type: 3
|
|
#& title: TSN Ranksystem
|
|
#& description: Web interface with rank for TeamSpeak
|
|
#& note: Website: <a href='https://ts-ranksystem.com/' target='_blank' rel='noopener'>TS-Ranksystem.com</a></br>You need to comment "INSTALL_MODE=1" after install.
|
|
#& categories: SelfHosted, PAPAMICA
|
|
#& platform: linux
|
|
#& logo: https://img.papamica.com/logo/tsnranksystem.png
|
|
|
|
#% SERVICE: Name of the service (No spaces or points) [ts3rank]
|
|
#% DATA_LOCATION: Data localization (Example: /apps/service) [/_data/apps]
|
|
#% URL: Service URL (Example: service.papamica.fr or service.com)
|
|
#% NETWORK: Your Traefik network (Example: proxy) [proxy]
|
|
#% DB_USER: Database user (No spaces or points) [ts3rank]
|
|
#% DB_PASSWORD: Database user password
|
|
#% DB_ROOT: Database root password
|
|
|
|
# Work with Portainer
|
|
version: '2'
|
|
services:
|
|
mariadb:
|
|
image: mariadb:10.4.12
|
|
container_name: $SERVICE-db
|
|
restart: always
|
|
volumes:
|
|
- $DATA_LOCATION/$SERVICE/db:/var/lib/mysql
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=$DB_ROOT
|
|
- MYSQL_DATABASE=RanksystemDatabase
|
|
- MYSQL_USER=$DB_USER
|
|
- MYSQL_PASSWORD=$DB_PASSWORD
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
|
timeout: 20s
|
|
retries: 10
|
|
networks:
|
|
- default
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
|
|
ranksystem:
|
|
image: jvmerkle/ts3-ranksystem
|
|
container_name: $SERVICE
|
|
stop_signal: SIGTERM
|
|
restart: always
|
|
depends_on:
|
|
- mariadb
|
|
environment:
|
|
- INSTALL_MODE=1
|
|
- BASE_HREF=/
|
|
- DB_TYPE=mysql
|
|
- DB_HOST=$SERVICE-db
|
|
- DB_NAME=RanksystemDatabase
|
|
- DB_USERNAME=$DB_USER
|
|
- DB_PASSWORD=$DB_PASSWORD
|
|
healthcheck:
|
|
test: curl --fail http://localhost:80 || exit 1
|
|
interval: 1m
|
|
timeout: 30s
|
|
retries: 3
|
|
networks:
|
|
- default
|
|
labels:
|
|
- "autoupdate=monitor" # https://github.com/PAPAMICA/container-updater
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.$SERVICE.entrypoints=https"
|
|
- "traefik.http.routers.$SERVICE.rule=Host(`$URL`)"
|
|
- "traefik.http.routers.$SERVICE.tls=true"
|
|
- "traefik.http.routers.$SERVICE.tls.certresolver=http"
|
|
- "traefik.docker.network=$NETWORK"
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: $NETWORK |