Compare commits

...

10 Commits

Author SHA1 Message Date
teddy
2996aefa8f update 2025-06-04 14:40:55 +07:00
teddy
e61bd5160d update 2025-06-04 14:33:41 +07:00
teddy
7113c24817 update 2025-06-04 14:33:20 +07:00
teddy
bc75947f51 update tapngo validate out 2025-06-04 14:23:19 +07:00
teddy
ae676d80c5 update tapngo validate out 2025-06-04 14:18:27 +07:00
teddy
43270cbaa9 update 2025-06-04 14:13:30 +07:00
teddy
3ab6552290 update 2025-06-04 12:06:37 +07:00
teddy
0ed9b55801 update 2025-05-23 17:25:35 +07:00
teddy
7c40cad831 update 2025-05-23 17:14:33 +07:00
teddy
ba4ce4fca6 update 2025-05-23 17:10:24 +07:00
3 changed files with 21 additions and 16 deletions

View File

@@ -12,8 +12,8 @@ build_image:
script: script:
- echo "Isi file .env:" - echo "Isi file .env:"
- cat .env - cat .env
- docker build -t 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_ID - docker push 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_IID
environment: environment:
only: only:
- main - main
@@ -24,7 +24,7 @@ build_image:
deploy_development: deploy_development:
stage: deploy stage: deploy
script: script:
- docker stack deploy --compose-file compose.yml email-notification - docker run -d --name $PROJECT_NAME --memory="50m" --cpus="0.1" --restart always -p 7010:3000 36.66.3.44:7007/$PROJECT_NAME:$CI_PIPELINE_IID
environment: environment:
only: only:
- main - main
@@ -35,6 +35,8 @@ deploy_development:
cleaning_image_and_container: cleaning_image_and_container:
stage: cleaning stage: cleaning
script: script:
- docker stop $PROJECT_NAME || true
- docker rm $PROJECT_NAME || true
- echo y | docker container prune - echo y | docker container prune
- echo y | docker image prune -a - echo y | docker image prune -a
environment: environment:

View File

@@ -9,6 +9,6 @@ RUN go mod download
RUN go build -o /email-notification RUN go build -o /email-notification
EXPOSE 3000 EXPOSE 3000
CMD [ "/email-notification" ] CMD [ "/email-notification" ]

View File

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