This commit is contained in:
teddy
2025-09-29 10:52:42 +07:00
parent a8978d81a2
commit d348cfbccb
4 changed files with 74 additions and 0 deletions

40
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,40 @@
# tahapan
stages:
- cleaning
- build_image
- deploy
# build image on development server
build_image:
stage: build_image
script:
- docker build -t 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_ID .
- docker push 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_ID
environment:
only:
- dev
tags:
- runner-internal-his
# deploy to development server
deploy_development:
stage: deploy
script:
- docker stack deploy --compose-file compose.yml scheduler-app
environment:
only:
- dev
tags:
- runner-internal-his
# deploy to development server
cleaning_image_and_container:
stage: cleaning
script:
- echo y | docker container prune
- echo y | docker image prune -a
environment:
only:
- dev
tags:
- runner-internal-his