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

Commit

Permalink
fix(infra): Latest for stable and master for daily
Browse files Browse the repository at this point in the history
  • Loading branch information
juligasa committed Oct 4, 2023
1 parent f5959d2 commit e8f754a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/generate-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,72 +26,72 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push latest mintter-site
- name: Build and push edge mintter-site
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/mintter-site/Dockerfile
tags: mintter/mintter-site:latest
tags: mintter/mintter-site:master
- name: Build and push stable mintter-site
if: ${{ steps.weekday.outputs.weekday == '3' }}
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/mintter-site/Dockerfile
tags: mintter/mintter-site:stable
tags: mintter/mintter-site:latest

- name: Build and push latest mintterd
- name: Build and push edge mintterd
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/mintterd/Dockerfile
tags: mintter/mintterd:latest
tags: mintter/mintterd:master
- name: Build and push stable mintterd
if: ${{ steps.weekday.outputs.weekday == '3' }}
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/mintterd/Dockerfile
tags: mintter/mintterd:stable
tags: mintter/mintterd:latest

- name: Build and push latest nextjs
- name: Build and push edge nextjs
uses: docker/build-push-action@v4
with:
push: true
file: frontend/apps/site/Dockerfile
tags: mintter/sitegw:latest
tags: mintter/sitegw:master
- name: Build and push stable nextjs
if: ${{ steps.weekday.outputs.weekday == '3' }}
uses: docker/build-push-action@v4
with:
push: true
file: frontend/apps/site/Dockerfile
tags: mintter/sitegw:stable
tags: mintter/sitegw:latest

- name: Build and push latest monitord
- name: Build and push edge monitord
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/monitord/Dockerfile
tags: mintter/monitord:latest
tags: mintter/monitord:master
- name: Build and push stable monitord
if: ${{ steps.weekday.outputs.weekday == '3' }}
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/monitord/Dockerfile
tags: mintter/monitord:stable
tags: mintter/monitord:latest

- name: Build and push latest relay
- name: Build and push edge relay
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/relayd/Dockerfile
tags: mintter/relayd:latest
tags: mintter/relayd:master
- name: Build and push stable relay
if: ${{ steps.weekday.outputs.weekday == '3' }}
uses: docker/build-push-action@v4
with:
push: true
file: backend/cmd/relayd/Dockerfile
tags: mintter/relayd:stable
tags: mintter/relayd:latest
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:

nextjs:
container_name: ${MTT_SITE_NEXTJS_CONTAINER_NAME:-nextjs}
image: mintter/sitegw:${MTT_SITE_TAG:-stable}
image: mintter/sitegw:${MTT_SITE_TAG:-latest}
depends_on:
- minttersite
networks:
Expand All @@ -42,7 +42,7 @@ services:
- "NEXT_PUBLIC_LN_HOST=${MTT_SITE_LN_HOST:-https://ln.mintter.com}"

minttersite:
image: mintter/mintter-site:${MTT_SITE_TAG:-stable}
image: mintter/mintter-site:${MTT_SITE_TAG:-latest}
restart: unless-stopped
container_name: ${MTT_SITE_DAEMON_CONTAINER_NAME:-minttersite}
ports:
Expand Down
6 changes: 3 additions & 3 deletions website_deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')"

workspace="${HOME}/.mtt-site"
hostname=""
tag="stable"
tag="latest"
auto_update=0
usage()
{
echo "group_deployment script. It links a group [options] hostname"
echo " hostname :protocol + domain this sice will be served in. Ex.: https://example.com"
echo "Options"
echo "-t --tag T :image tag to pull. stable by default"
echo "-t --tag T :image tag to pull. latest by default"
echo "-a --auto-update :updates containers whenever a new image is available. Disabled by default"
echo "-h --help :shows help and exit"
}
Expand Down Expand Up @@ -140,7 +140,7 @@ BLOCK

if [ $auto_update -eq 1 ]; then
docker rm -f autoupdater >/dev/null 2>&1
docker run -d --name autoupdater -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -i 600 nextjs minttersite >/dev/null 2>&1
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_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
Expand Down

0 comments on commit e8f754a

Please sign in to comment.