From 439d80665a7fb45e5669a47b9629c0afac0cc650 Mon Sep 17 00:00:00 2001 From: Flancian <0@flancia.org> Date: Wed, 5 Jul 2023 19:13:11 +0200 Subject: [PATCH] Trying Agora bootstrap as an independent container, as per: https://git.coopcloud.tech/coop-cloud/rocketchat/src/branch/main/compose.yml#L73-L89 --- .env.sample | 13 ++++++++++++- compose.yml | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/.env.sample b/.env.sample index f45f05b..752351f 100644 --- a/.env.sample +++ b/.env.sample @@ -1,8 +1,19 @@ TYPE=agora -DOMAIN=agor.ai +DOMAIN=example.agor.ai ## Domain aliases #EXTRA_DOMAINS=', `www.agora.example.com`' LETS_ENCRYPT_ENV=production + +# The username to run services as in containers. +AGORA_USER=agora + +# A git repository containing an Agora root -- meaning at least a sources.yaml or agora.yaml file +AGORA_GIT=https://github.com/flancian/agora + +# The local path where the Agora root will be cloned if necessary. Agora Bridge writes here, Agora Server (mostly) reads. +AGORA_PATH=/home/$AGORA_USER/agora + + diff --git a/compose.yml b/compose.yml index f4c7cb8..f41e81c 100644 --- a/compose.yml +++ b/compose.yml @@ -2,8 +2,17 @@ version: "3.8" services: - app: - image: git.coopcloud.tech/flancian/agora + server: + environment: + - AGORA_USER=$AGORA_USER + - AGORA_PATH=$AGORA_PATH +$AGORA_PATH + - AGORA_GIT=$AGORA_GIT + image: git.coopcloud.tech/flancian/agora-server + volumes: + - data:$AGORA_PATH + ports: + - 5017:5017 networks: - proxy deploy: @@ -27,7 +36,39 @@ services: # timeout: 10s # retries: 10 # start_period: 1m + + bridge: + environment: + - AGORA_USER=$AGORA_USER + - AGORA_PATH=$AGORA_PATH +$AGORA_PATH + - AGORA_GIT=$AGORA_GIT + image: git.coopcloud.tech/flancian/agora-bridge + volumes: + - data:$AGORA_PATH + deploy: + restart_policy: + delay: 30s + + # This is meant to run once at the seeding of the Agora, when the AGORA_ROOT (volume) is found empty. + # It will clone a git repository into the designated location. + bootstrap: + environment: + - AGORA_USER=$AGORA_USER + - AGORA_PATH=$AGORA_PATH +$AGORA_PATH + - AGORA_GIT=$AGORA_GIT + image: git.coopcloud.tech/flancian/agora-bridge + volumes: + - data:$AGORA_PATH + deploy: + restart_policy: + delay: 30s + networks: proxy: external: true + +volumes: + data: