sprint/.gitlab-ci.yml
Egor Matveev c54144eed4 gitlab
2021-11-06 01:30:20 +03:00

42 lines
586 B
YAML

stages:
- build
- deploy-dev
- deploy-prod
variables:
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
DB_HOST: "postgres"
build:
stage: build
tags:
- main
script:
- docker build -t sprint .
deploy-dev:
stage: deploy-dev
tags:
- main
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- when: manual
variables:
PORT: 80
script:
- docker-compose up -d
deploy-prod:
stage: deploy-prod
tags:
- prod
only:
- master
when: manual
variables:
PORT: 443
script:
- docker-compose up -d