2.2 KiB
2.2 KiB
Deployment
This repository now uses the same GitLab shell-runner deployment pattern as call-center: no project CI/CD variables are required for the normal push deploy path.
What happens on push
- GitLab runs the existing
testjob. - A dedicated shell runner with tag
marketing-parser-prodpicks updeploy_production. - The runner syncs the repository into
/home/gitlab-runner/deploy/marketing-parser. - The runner builds a local Docker image from that synced checkout.
- Docker Compose recreates
konturai-parser-appfrom deployment/docker-compose.server.yml.
Files used
- .gitlab-ci.yml
- deployment/docker-compose.server.yml
- scripts/deploy_gitlab.sh
- scripts/bootstrap_gitlab_deploy.sh
- scripts/install_gitlab_runner.sh
One-time server setup
Install and register a shell runner on the target server:
cd /root/marketing-parser
RUNNER_TOKEN=glrt-xxxxxxxx bash scripts/install_gitlab_runner.sh
Then bootstrap the production env file from the current konturai-parser-app container:
cd /root/marketing-parser
bash scripts/bootstrap_gitlab_deploy.sh
That writes /home/gitlab-runner/deploy/marketing-parser/.env.production, which is used by the deploy job.
Important notes
- The deploy job runs for pushes and manual web-triggered pipelines on the branch that contains this CI configuration.
- The runner user must have Docker access.
- This setup expects a host
shellrunner. A minimalgitlab/gitlab-runner:alpinecontainer is not enough unless you also provide Docker, Compose, andrsyncinside that runner environment. - This deploy path is intentionally independent from
/root/docker-compose.yamlbecause/rootis not accessible to thegitlab-runneruser. - The deployment compose file joins the existing external Docker network
common_networkand publishes the service aliasparser-service.