This commit is contained in:
tuanvu
2026-02-16 17:38:10 +01:00
parent 9d15c7dfa3
commit 181eb1ae4a

View File

@@ -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