This commit is contained in:
teddy
2025-06-04 14:13:30 +07:00
parent 3ab6552290
commit 43270cbaa9
2 changed files with 16 additions and 12 deletions

View File

@@ -12,8 +12,8 @@ build_image:
script:
- echo "Isi file .env:"
- cat .env
- 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
- docker build -t 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_IID .
- docker push 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_IID
environment:
only:
- main
@@ -24,7 +24,7 @@ build_image:
deploy_development:
stage: deploy
script:
- docker stack deploy --compose-file compose.yml email-notification
- docker compose -f compose.yml up -d $PROJECT_NAME
environment:
only:
- main
@@ -35,6 +35,8 @@ deploy_development:
cleaning_image_and_container:
stage: cleaning
script:
- docker stop $PROJECT_NAME || true
- docker rm $PROJECT_NAME || true
- echo y | docker container prune
- echo y | docker image prune -a
environment:

View File

@@ -2,18 +2,20 @@ version: '3.8'
services:
app:
image: 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_ID
image: 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_IID
# dns:
# - 8.8.8.8
# - 1.1.1.1
deploy:
replicas : 1
restart_policy :
condition: on-failure
resources:
limits:
cpus: "0.1"
memory: "50m"
# deploy:
# replicas : 1
# restart_policy :
# condition: on-failure
# resources:
# limits:
# cpus: "0.1"
# memory: "50m"
restart: always
mem_limit: 50m
cpus: 0.1
ports:
- "7010:3000"