mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
fix: Deploy nginx last
This commit is contained in:
@@ -86,7 +86,7 @@ jobs:
|
|||||||
sed -i "s|<timetable_jdbc_database_username>|$ESCAPED|g" docker/${{ matrix.env }}/stack-config/timetable.yaml
|
sed -i "s|<timetable_jdbc_database_username>|$ESCAPED|g" docker/${{ matrix.env }}/stack-config/timetable.yaml
|
||||||
ESCAPED=$(printf '%s' "$TIMETABLE_JDBC_DATABASE_PASSWORD" | sed 's/&/\\&/g')
|
ESCAPED=$(printf '%s' "$TIMETABLE_JDBC_DATABASE_PASSWORD" | sed 's/&/\\&/g')
|
||||||
sed -i "s|<timetable_jdbc_database_password>|$ESCAPED|g" docker/${{ matrix.env }}/stack-config/timetable.yaml
|
sed -i "s|<timetable_jdbc_database_password>|$ESCAPED|g" docker/${{ matrix.env }}/stack-config/timetable.yaml
|
||||||
- name: Copy files to remote
|
- name: Copy stack config to remote
|
||||||
if: steps.check.outputs.should_deploy == 'true'
|
if: steps.check.outputs.should_deploy == 'true'
|
||||||
uses: burnett01/rsync-deployments@7.0.2
|
uses: burnett01/rsync-deployments@7.0.2
|
||||||
with:
|
with:
|
||||||
@@ -97,6 +97,17 @@ jobs:
|
|||||||
remote_port: ${{ secrets.DEPLOY_PORT }}
|
remote_port: ${{ secrets.DEPLOY_PORT }}
|
||||||
remote_user: ${{ secrets.DEPLOY_USER }}
|
remote_user: ${{ secrets.DEPLOY_USER }}
|
||||||
remote_key: ${{ secrets.DEPLOY_KEY }}
|
remote_key: ${{ secrets.DEPLOY_KEY }}
|
||||||
|
- name: Copy nginx stack config to remote
|
||||||
|
if: steps.check.outputs.should_deploy == 'true'
|
||||||
|
uses: burnett01/rsync-deployments@7.0.2
|
||||||
|
with:
|
||||||
|
switches: -az -r --del
|
||||||
|
path: docker/${{ matrix.env }}/nginx.yaml
|
||||||
|
remote_path: ~/
|
||||||
|
remote_host: ${{ secrets.DEPLOY_HOST }}
|
||||||
|
remote_port: ${{ secrets.DEPLOY_PORT }}
|
||||||
|
remote_user: ${{ secrets.DEPLOY_USER }}
|
||||||
|
remote_key: ${{ secrets.DEPLOY_KEY }}
|
||||||
- name: Deploy applications
|
- name: Deploy applications
|
||||||
if: steps.check.outputs.should_deploy == 'true'
|
if: steps.check.outputs.should_deploy == 'true'
|
||||||
uses: appleboy/ssh-action@v1
|
uses: appleboy/ssh-action@v1
|
||||||
@@ -111,4 +122,7 @@ jobs:
|
|||||||
IMAGE=$(grep -oE 'image: *[^ ]+' "$f" | sed 's/^image: *//')
|
IMAGE=$(grep -oE 'image: *[^ ]+' "$f" | sed 's/^image: *//')
|
||||||
docker pull "$IMAGE"
|
docker pull "$IMAGE"
|
||||||
docker stack deploy -c "$f" "$NAME" --detach=false
|
docker stack deploy -c "$f" "$NAME" --detach=false
|
||||||
done
|
done
|
||||||
|
IMAGE=$(grep -oE 'image: *[^ ]+' ~/nginx.yaml | sed 's/^image: *//')
|
||||||
|
docker pull "$IMAGE"
|
||||||
|
docker stack deploy -c ~/nginx.yaml nginx --detach=false
|
||||||
Reference in New Issue
Block a user