fix: add migrations service to docker-compose and update build workflow for migrations image
This commit is contained in:
@@ -21,6 +21,11 @@ jobs:
|
||||
docker build -t ${{ secrets.GIT_HOST }}/${{ gitea.repository }}:app -f app/Dockerfile .
|
||||
docker push ${{ secrets.GIT_HOST }}/${{ gitea.repository }}:app
|
||||
|
||||
- name: Build and push migrations image
|
||||
run: |
|
||||
docker build -t ${{ secrets.GIT_HOST }}/${{ gitea.repository }}:migrations -f migrations/Dockerfile .
|
||||
docker push ${{ secrets.GIT_HOST }}/${{ gitea.repository }}:migrations
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
@@ -28,7 +33,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Instasll SSH key
|
||||
- name: Install SSH key
|
||||
uses: webfactory/ssh-agent@v0.9.0
|
||||
with:
|
||||
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
@@ -47,6 +52,7 @@ jobs:
|
||||
ssh ${{ secrets.LXC_USER }}@${{ secrets.LXC_HOST }} << 'EOF'
|
||||
echo "${{ secrets.TOKEN }}" | docker login ${{ secrets.GIT_HOST }} -u ${{ secrets.USERNAME }} --password-stdin
|
||||
docker pull ${{ secrets.GIT_HOST }}/${{ gitea.repository }}:app
|
||||
docker pull ${{ secrets.GIT_HOST }}/${{ gitea.repository }}:migrations
|
||||
cd /srv/app
|
||||
docker compose up -d --force-recreate
|
||||
docker image prune -f
|
||||
|
||||
Reference in New Issue
Block a user