diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f2e0211..4509243 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,8 @@ stages: - build + - predeploy - deploy + - run build_backend: stage: build @@ -26,10 +28,42 @@ build_nginx: only: - ci-test01 +remove_old_containers: + stage: predeploy + tags: + - ci-test01 + script: docker rm --force `docker ps -qa` || true + only: + - ci-test01 + deploy_network: - stage: deploy + stage: predeploy tags: - ci-test01 script: docker network create app || true only: - ci-test01 + +deploy_backend: + stage: deploy + tags: + - ci-test01 + script: docker run -d --name notes-back --network app my_backend + only: + - ci-test01 + +deploy_frontend: + stage: deploy + tags: + - ci-test01 + script: docker run -d --name notes-app --network app my_frontend + only: + - ci-test01 + +deploy_nginx: + stage: run + tags: + - ci-test01 + script: docker run -d --name nginx --network app my_nginx + only: + - ci-test01