diff --git a/.gitea/workflows/deploy-dev.yaml b/.gitea/workflows/deploy-dev.yaml index 627017b..bf0c49a 100644 --- a/.gitea/workflows/deploy-dev.yaml +++ b/.gitea/workflows/deploy-dev.yaml @@ -41,6 +41,8 @@ jobs: uses: actions/checkout@v4 with: ref: dev + - name: prepare + run: ./run.sh - name: deploy swarmpit run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-dev.yaml swarmpit - name: deploy portainer diff --git a/.gitea/workflows/deploy-prod.yaml b/.gitea/workflows/deploy-prod.yaml index 12f4022..01f39c2 100644 --- a/.gitea/workflows/deploy-prod.yaml +++ b/.gitea/workflows/deploy-prod.yaml @@ -41,6 +41,8 @@ jobs: uses: actions/checkout@v4 with: ref: prod + - name: prepare + run: ./run.sh - name: deploy swarmpit run: docker stack deploy --with-registry-auth -c ./.deploy-swarmpit/deploy-prod.yaml swarmpit - name: deploy portainer diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..21dbcbe --- /dev/null +++ b/run.sh @@ -0,0 +1,12 @@ +docker login -u mathwave -p $DOCKERHUB_PASSWORD +docker network create -d overlay --attachable swarmpit-nginx || true +docker network create -d overlay --attachable common-infra-nginx || true +docker network create -d overlay --attachable queues || true +mkdir /sprint-data/mongo || true +mkdir /sprint-data/redis || true +mkdir /sprint-data/rabbitmq || true +mkdir /sprint-data/certs || true +mkdir /sprint-data/gitea || true +chmod 777 /sprint-data/redis +chmod 777 /sprint-data/rabbitmq +chmod 777 /sprint-data/gitea \ No newline at end of file