refactor(HedgeDoc): Used empty docker-compose on url folder to simplify

This commit is contained in:
Simon 2021-07-23 15:29:23 +02:00
parent aad0c0481d
commit 25c099b409
4 changed files with 54 additions and 7 deletions

View File

@ -0,0 +1,34 @@
########
# DOCKER
COMPOSE_FILE=./docker-compose.yml:../../hedgedoc/docker-compose.yml:../../hedgedoc/docker-compose.traefik.yml:../../postgres/docker-compose.yml
#DOCKER_HOST=
##########
# HEDGEDOC
HEDGEDOC_DOMAIN=hedgedoc.exemple.fr
HEDGEDOC_VOLUME_NAME=hedgedoc_exemple_fr_hedgedoc
HEDGEDOC_CONTAINER_NAME=hedgedoc_exemple_fr_hedgedoc
#HEDGEDOC_IMAGE=
#NODE_ENV=
#CMD_PROTOCOL_USESSL=
#CMD_ALLOW_GRAVATAR=
#CMD_ALLOW_FREEURL=
#CMD_ALLOW_EMAIL_REGISTER=
##########
# POSTGRES
POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_DB=database
POSTGRES_VOLUME_NAME=hedgedoc_exemple_fr_postgres
POSTGRES_CONTAINER_NAME=hedgedoc_exemple_fr_postgres
#POSTGRES_IMAGE=
#########
# TRAEFIK
#TRAEFIK_NETWORK_NAME=
#TRAEFIK_ROUTER_NAME=hedgedoc_exemple_fr # Don't use char '.'

View File

@ -0,0 +1,5 @@
version: "3.8"
# Ce fichier même vide est important puisqu'il permet de configurer la racine du
# lancement de docker-compose. Il est possible de venir surcharger le template
# utilisé

View File

@ -0,0 +1,13 @@
version: "3.8"
networks:
default:
name: ${TRAEFIK_NETWORK_NAME:-traefik}
services:
hedgedoc:
labels:
- traefik.enable=true
- traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-hedgedoc}.rule=Host(`${HEDGEDOC_DOMAIN:?err}`)
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-hedgedoc}.entrypoints=web

View File

@ -9,8 +9,8 @@ services:
container_name: ${HEDGEDOC_CONTAINER_NAME:-hedgedoc}
image: ${HEDGEDOC_IMAGE:-linuxserver/hedgedoc:1.8.2-ls22}
restart: always
# depends_on: # It's commented because docker `extends` don't support it
# - postgres
depends_on:
- postgres
volumes:
- hedgedoc:/config
- /etc/timezone:/etc/timezone:ro
@ -24,8 +24,3 @@ services:
CMD_ALLOW_GRAVATAR: ${CMD_ALLOW_GRAVATAR:-true}
CMD_ALLOW_FREEURL: ${CMD_ALLOW_FREEURL:-false}
CMD_ALLOW_EMAIL_REGISTER: ${CMD_ALLOW_EMAIL_REGISTER:-true}
labels:
- traefik.enable=true
- traefik.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-hedgedoc}.rule=Host(`${HEDGEDOC_DOMAIN:?err}`)
- traefik.http.routers.${TRAEFIK_ROUTER_NAME:-hedgedoc}.entrypoints=web