9 Commits
Author SHA1 Message Date
tarabanov.if 0fb884cb3c Update file .gitlab-ci.yml 2024-04-22 11:56:16 +00:00
tarabanov.if 30b928b7b2 Update file .gitlab-ci.yml 2024-04-22 11:50:41 +00:00
tarabanov.if ecc51eee3d Update file .gitlab-ci.yml 2024-04-22 11:48:46 +00:00
tarabanov.if 3b79e68ffe Update file .gitlab-ci.yml 2024-04-22 11:46:49 +00:00
tarabanov.if e2290da23f Update file .gitlab-ci.yml 2024-04-22 11:45:49 +00:00
tarabanov.if 7bd0767916 Update file .gitlab-ci.yml 2024-04-22 11:22:29 +00:00
tarabanov.if 0b7305ab0f Update file .gitlab-ci.yml 2024-04-22 11:18:00 +00:00
tarabanov.if c255ff8c92 Update file .gitlab-ci.yml 2024-04-22 11:15:49 +00:00
tarabanov.if 9478342d02 test 2024-04-22 11:14:22 +00:00
+12 -44
View File
@@ -4,54 +4,22 @@ default:
stages:
- build
- predeploy
- deploy
- run
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
build_backend:
stage: build
script: docker build -t my_backend notes-backend/
only:
- ci-test01
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:back notes-backend
- docker push $CI_REGISTRY_IMAGE:back
build_frontend:
stage: build
script: docker build -t my_frontend notes-app/
only:
- ci-test01
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:front notes-app
- docker push $CI_REGISTRY_IMAGE:front
build_nginx:
stage: build
script: docker build -t my_nginx nginx/
only:
- ci-test01
remove_old_containers:
stage: predeploy
script: docker rm --force `docker ps -qa` || true
only:
- ci-test01
deploy_network:
stage: predeploy
script: docker network create app || true
only:
- ci-test01
deploy_backend:
stage: deploy
script: docker run -d --name notes-back --network app my_backend
only:
- ci-test01
deploy_frontend:
stage: deploy
script: docker run -d --name notes-app --network app my_frontend
only:
- ci-test01
deploy_nginx:
stage: run
script: docker run -d --name nginx --network app -p 80:80 my_nginx
only:
- ci-test01