test4
This commit is contained in:
@@ -87,8 +87,7 @@ deploy_production:
|
||||
image: alpine:latest
|
||||
dependencies:
|
||||
- build_docker_frontend
|
||||
rules:
|
||||
- if: '$NEW_COMMIT == "true"'
|
||||
- check_app_update
|
||||
before_script:
|
||||
- apk add --no-cache openssh-client docker-cli
|
||||
- mkdir -p ~/.ssh
|
||||
@@ -97,13 +96,18 @@ deploy_production:
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- ssh-keyscan -H "$DEPLOY_SERVER" >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||
script:
|
||||
- source variables.env || true
|
||||
- if [ "$NEW_COMMIT" != "true" ]; then
|
||||
echo "No new commit, skipping build";
|
||||
exit 0;
|
||||
fi
|
||||
- |
|
||||
ssh "$DEPLOY_USER@$DEPLOY_SERVER" << 'EOF'
|
||||
cd /app
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
EOF
|
||||
#environment:
|
||||
#name: production
|
||||
#url: http://127.0.0.1
|
||||
when: manual
|
||||
environment:
|
||||
name: production
|
||||
url: http://148.60.11.130
|
||||
when: manual
|
||||
Reference in New Issue
Block a user