mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-03-18 21:30:41 +01:00
70 lines
2.2 KiB
YAML
70 lines
2.2 KiB
YAML
|
|
# Docker-compose mis à disposition par Mickael "PAPAMICA" Asseline
|
|
# Date de mise à jour : 27/10/2020
|
|
|
|
# Variables d'environnement à déclarer :
|
|
# - SERVICE : nom du service (exemple : plex)
|
|
# - DATA_LOCATION : localisation des données (exemple /apps/"service")
|
|
# - URL_LOKI : lien du serveur loki (exemple : ndd/loki/api/v1/push)
|
|
# - NDD : lien du nom de domaine (exemple : papamica.fr)
|
|
# - DB_PASSWORD : mot de passe pour la base de données
|
|
# - SECRET_KEY : mot de passe d'accès administrateur à l'application
|
|
|
|
# Fonctionne avec Portainer
|
|
version: '2'
|
|
services:
|
|
logchimp-db:
|
|
image: postgres:12.4
|
|
container_name: $SERVICE-db
|
|
environment:
|
|
- POSTGRES_DB=logchimp
|
|
- POSTGRES_USER=logchimp
|
|
- POSTGRES_PASSWORD=$DB_PASSWORD
|
|
volumes:
|
|
- $DATA_LOCATION/db:/var/lib/postgresql/data
|
|
networks:
|
|
- proxy
|
|
logging:
|
|
driver: loki
|
|
options:
|
|
loki-url: "$URL_LOKI"
|
|
loki-external-labels: service={{.Name}}
|
|
|
|
logchimp:
|
|
image: tiredofit/logchimp:latest
|
|
container_name: $SERVICE
|
|
environment:
|
|
- DB_HOST=$SERVICE-db
|
|
- DB_NAME=logchimp
|
|
- APP_KEY=$SECRET_KEY
|
|
- DB_USER=logchimp
|
|
- DB_PASS=$DB_PASSWORD
|
|
# volumes:
|
|
# - $DATA_LOCATION/data:/astuto
|
|
depends_on:
|
|
- logchimp-db
|
|
networks:
|
|
- proxy
|
|
logging:
|
|
driver: loki
|
|
options:
|
|
loki-url: "$URL_LOKI"
|
|
loki-external-labels: service={{.Name}}
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.$SERVICE.entrypoints=http"
|
|
- "traefik.http.routers.$SERVICE.rule=Host(`$SERVICE.$NDD`)"
|
|
- "traefik.http.middlewares.$SERVICE-https-redirect.redirectscheme.scheme=https"
|
|
- "traefik.http.routers.$SERVICE.middlewares=$SERVICE-https-redirect"
|
|
- "traefik.http.routers.$SERVICE-secure.entrypoints=https"
|
|
- "traefik.http.routers.$SERVICE-secure.rule=Host(`$SERVICE.$NDD`)"
|
|
- "traefik.http.routers.$SERVICE-secure.tls=true"
|
|
- "traefik.http.routers.$SERVICE-secure.tls.certresolver=http"
|
|
# - "traefik.http.services.$SERVICE-secure.loadbalancer.server.port=8080"
|
|
- "traefik.docker.network=proxy"
|
|
|
|
|
|
networks:
|
|
proxy:
|
|
external:
|
|
name: proxy |