Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
fix(infra): optional gateway pull mode for sites
Browse files Browse the repository at this point in the history
  • Loading branch information
juligasa committed Oct 16, 2023
1 parent cff7733 commit 9ca0951
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
- "--http.port=${MTT_SITE_BACKEND_GRPCWEB_PORT:-56001}"
- "-grpc.port=56002"
- "-syncing.no-discovery=${MTT_SITE_NO_DISCOVERY:-true}"
- "-syncing.no-pull=${MTT_SITE_NO_PULL:-true}"
- "-p2p.no-relay"
- "-p2p.announce-addrs=/dns4/${MTT_SITE_DNS}/tcp/56000,/dns4/${MTT_SITE_DNS}/udp/56000/quic,/dns4/${MTT_SITE_DNS}/udp/56000/quic-v1"
- "${MTT_SITE_HOSTNAME:-http://nextjs}"
6 changes: 4 additions & 2 deletions website_deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ hostname=""
tag="latest"
auto_update=0
no_discovery="true"
no_pull="true"
usage()
{
echo "group_deployment script. It links a group [options] hostname"
Expand All @@ -37,7 +38,8 @@ while [ "$1" != "" ]; do
;;
-a | --auto-update ) auto_update=1
;;
-g | --gateway ) no_discovery="false"
-g | --gateway ) no_discovery="false"
no_pull="false"
;;
-t | --tag ) shift
tag="$1"
Expand Down Expand Up @@ -100,7 +102,7 @@ if [ $auto_update -eq 1 ]; then
docker run -d --name autoupdater -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -i 300 nextjs minttersite >/dev/null 2>&1
fi

MTT_SITE_DNS="$dns" MTT_SITE_TAG="$tag" MTT_SITE_NO_DISCOVERY="$no_discovery" MTT_SITE_HOSTNAME="$hostname" MTT_SITE_PROXY_CONTAINER_NAME="proxy" MTT_SITE_NEXTJS_CONTAINER_NAME="nextjs" MTT_SITE_DAEMON_CONTAINER_NAME="minttersite" docker compose -f ${workspace}/mttsite.yml up -d --pull always --quiet-pull 2> ${workspace}/deployment.log || true
MTT_SITE_DNS="$dns" MTT_SITE_TAG="$tag" MTT_SITE_NO_DISCOVERY="$no_discovery" MTT_SITE_NO_PULL="$no_pull" MTT_SITE_HOSTNAME="$hostname" MTT_SITE_PROXY_CONTAINER_NAME="proxy" MTT_SITE_NEXTJS_CONTAINER_NAME="nextjs" MTT_SITE_DAEMON_CONTAINER_NAME="minttersite" docker compose -f ${workspace}/mttsite.yml up -d --pull always --quiet-pull 2> ${workspace}/deployment.log || true
# MTT_SITE_DNS="$dns" MTT_SITE_HOSTNAME="$hostname" MTT_SITE_PROXY_CONTAINER_NAME="proxy" MTT_SITE_NEXTJS_CONTAINER_NAME="nextjs" MTT_SITE_DAEMON_CONTAINER_NAME="minttersite" docker compose -f ${workspace}/mttsite.yml up -d --pull always --quiet-pull 2> ${workspace}/deployment.log || true

timeout 15 docker logs -f minttersite 2> /dev/null | sed '/Site Invitation secret token: / q' | awk -F ': ' '{print $2}'
Expand Down

0 comments on commit 9ca0951

Please sign in to comment.