From cd85a899e0db98ca5b2afbe45b5236fd6073c6fa Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 17 Jul 2021 17:43:46 +0200 Subject: [PATCH] Working spoke model --- .env.sample | 19 +++++++++++++++++++ compose.spoke.yml | 8 ++++++++ compose.yml | 16 ++++++++++------ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 compose.spoke.yml diff --git a/.env.sample b/.env.sample index a18f052..1d950d1 100644 --- a/.env.sample +++ b/.env.sample @@ -4,3 +4,22 @@ DOMAIN=capsul.example.com ## Domain aliases #EXTRA_DOMAINS=', `www.capsul_flask.example.com`' LETS_ENCRYPT_ENV=production + +HUB_MODEL="capsul-flask" + +SPOKE_MODEL="mock" +# Spoke mode, comment above line and uncomment these two: +#SPOKE_MODEL="shell-scripts" +#COMPOSE_FILE="compose.yml:compose.spoke.yml" + +#MAIL_SERVER="" +#MAIL_PORT="465" +#MAIL_USE_TLS="yes" +#MAIL_USE_SSL="yes" +#MAIL_USERNAME="" +#MAIL_PASSWORD="" +#MAIL_DEFAULT_SENDER="capsul@example.com" +#ADMIN_EMAIL_ADDRESSES="" +#ADMIN_PANEL_ALLOW_EMAIL_ADDRESSES="admin@example.com" +# +#PROMETHEUS_URL="https://prometheus.example.com" diff --git a/compose.spoke.yml b/compose.spoke.yml new file mode 100644 index 0000000..bd2ac2d --- /dev/null +++ b/compose.spoke.yml @@ -0,0 +1,8 @@ +--- +version: "3.8" + +services: + app: + volumes: + - "/var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock" + - "/tank:/tank" diff --git a/compose.yml b/compose.yml index 3470510..a3fb194 100644 --- a/compose.yml +++ b/compose.yml @@ -9,6 +9,10 @@ services: - internal environment: - "POSTGRES_CONNECTION_PARAMETERS=host=db port=5432 user=capsul password=capsul dbname=capsul" + - "HUB_MODEL" + - "SPOKE_MODEL" + - "BASE_URL=https://${DOMAIN}" + #entrypoint: ['tail', '-f', '/dev/null'] deploy: restart_policy: condition: on-failure @@ -22,12 +26,12 @@ services: #- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect" #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true" #- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}" - healthcheck: - test: ["CMD", "wget", "--tries=1", "http://localhost:5000", "-O", "/dev/null"] - interval: 30s - timeout: 10s - retries: 10 - start_period: 1m + # healthcheck: + # test: ["CMD", "wget", "--tries=1", "http://localhost:5000", "-O", "/dev/null"] + # interval: 30s + # timeout: 10s + # retries: 10 + # start_period: 1m db: image: "postgres:9.6.5"