InfraHub
1stages:
2- build
3- test
4- deploy
5
6build_backend:
7stage: build
8script:
9- cd backend
10- docker build -t registry.example.com/smart-infra/backend:latest .
11- docker push registry.example.com/smart-infra/backend:latest
12
13build_frontend:
14stage: build
15script:
16- cd frontend
17- docker build -t registry.example.com/smart-infra/frontend:latest .
18- docker push registry.example.com/smart-infra/frontend:latest
19
20deploy:
21stage: deploy
22script:
23- ssh user@yandex-cloud "docker pull registry.example.com/smart-infra/backend:latest && docker pull registry.example.com/smart-infra/frontend:latest && docker-compose up -d"
24only:
25- main
26