diff --git a/.gitea/workflows/staging.yaml b/.gitea/workflows/staging.yaml new file mode 100644 index 0000000..e69de29 diff --git a/build.sh b/build.sh index 74614d3..e79a3e3 100644 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -docker build . -t rose-ash-ghost -docker build mysql -t rose-ash-mysql -docker build invite-token/app -f invite-token/app/Dockerfile -t invite-token +docker build . -t rose-ash-ghost:$1 +docker build mysql -t rose-ash-mysql:$1 +docker build invite-token/app -f invite-token/app/Dockerfile -t invite-token:$1 diff --git a/deploy.sh b/deploy.sh index 297e3ec..e189219 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,4 +1,4 @@ -docker stack rm rose-ash -. ./.env -export NODE=$1 -for i in 1 2 3 4 5 6 7 8 9 10; do sleep 5 && docker stack deploy -c docker-compose.yml rose-ash && break ; done +export VERSION=$1 +export NODE=$3 +docker stack rm $2 +for i in 1 2 3 4 5 6 7 8 9 10; do sleep 5 && docker stack deploy -c docker-compose.yml $2 --with-registry-auth && break ; done diff --git a/docker-compose.yml b/docker-compose.yml index bc6c3f0..1600484 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.3" services: ghost: - image: rose-ash-ghost:latest + image: registry.rose-ash.com/rose-ash-ghost:${VERSION} env_file: - ./.env volumes: @@ -21,7 +21,7 @@ services: constraints: [node.labels.node == $NODE ] invite-token: - image: invite-token + image: registry.rose-ash.com/invite-token:${VERSION} environment: MYSQL_USER: ghost MYSQL_PASSWORD: ghostdbpass @@ -39,7 +39,7 @@ services: #- 3010:3002 db: - image: rose-ash-mysql:latest + image: registry.rose-ash.com/rose-ash-mysql:${VERSION} environment: MYSQL_ROOT_PASSWORD: mysqlrootpass MYSQL_USER: ghost diff --git a/push.sh b/push.sh new file mode 100644 index 0000000..5132c4b --- /dev/null +++ b/push.sh @@ -0,0 +1,3 @@ +docker push registry.rose-ash.com/rose-ash-ghost:$1 +docker push registry.rose-ash.com/invite-token:$1 +docker push registry.rose-ash.com/rose-ash-mysql:$1