Compare commits

..

14 Commits

Author SHA1 Message Date
teddys48
ca5d3cc3e0 update
All checks were successful
Build and Deploy Scheduler / cleaning (push) Successful in 3s
Build and Deploy Scheduler / build_image (push) Successful in 1m31s
Build and Deploy Scheduler / deploy (push) Successful in 53s
2026-02-13 10:08:35 +07:00
teddys48
7d3c68066c 10
All checks were successful
Build and Deploy Scheduler / cleaning (push) Successful in 1s
Build and Deploy Scheduler / build_image (push) Successful in 1m5s
Build and Deploy Scheduler / deploy (push) Successful in 25s
2026-02-12 14:41:35 +07:00
teddys48
7437e109fe 9
All checks were successful
Build and Deploy Scheduler / cleaning (push) Successful in 1s
Build and Deploy Scheduler / build_image (push) Successful in 1m18s
Build and Deploy Scheduler / deploy (push) Successful in 12s
2026-02-12 14:37:50 +07:00
teddys48
eb1d6daf2c 9
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 3s
Build and Deploy Scheduler / build_image (push) Successful in 1m15s
Build and Deploy Scheduler / deploy (push) Failing after 1s
2026-02-12 14:35:43 +07:00
teddys48
4f2dc5110f 8
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m19s
Build and Deploy Scheduler / deploy (push) Failing after 1s
2026-02-12 14:31:38 +07:00
teddys48
607074eb33 8
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 6s
Build and Deploy Scheduler / build_image (push) Successful in 1m9s
Build and Deploy Scheduler / deploy (push) Failing after 0s
2026-02-12 14:28:17 +07:00
teddys48
1202e3464f 7
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m32s
Build and Deploy Scheduler / deploy (push) Failing after 0s
2026-02-12 14:09:21 +07:00
teddys48
96a934a3de 7
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m47s
Build and Deploy Scheduler / deploy (push) Failing after 1s
2026-02-12 14:05:17 +07:00
teddys48
318f21c826 6
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m14s
Build and Deploy Scheduler / deploy (push) Failing after 0s
2026-02-12 12:16:11 +07:00
teddys48
19a3de9eb9 6
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 1s
Build and Deploy Scheduler / build_image (push) Successful in 1m8s
Build and Deploy Scheduler / deploy (push) Failing after 6s
2026-02-12 12:10:00 +07:00
teddys48
1925adaf42 5
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m18s
Build and Deploy Scheduler / deploy (push) Failing after 0s
2026-02-12 12:07:16 +07:00
teddys48
74d9eb6124 first4
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m5s
Build and Deploy Scheduler / deploy (push) Failing after 0s
2026-02-12 11:59:18 +07:00
teddys48
b6c0ada4a5 first3
Some checks failed
Build and Deploy Scheduler / cleaning (push) Successful in 2s
Build and Deploy Scheduler / build_image (push) Successful in 1m8s
Build and Deploy Scheduler / deploy (push) Failing after 1s
2026-02-12 11:47:31 +07:00
teddys48
7f32130e27 first3 2026-02-12 11:47:09 +07:00
3 changed files with 40 additions and 22 deletions

View File

@@ -39,6 +39,18 @@ jobs:
runs-on: host
needs: build_image
steps:
- name: Clone repo
run: |
git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
git checkout ${{ gitea.ref_name }}
- name: Prepare env for compose
run: |
echo "REGISTRY=$REGISTRY" > .env
echo "IMAGE_NAME=$IMAGE_NAME" >> .env
echo "TAG=${{ gitea.run_number }}" >> .env
cat .env
- name: Deploy stack
run: |
docker-compose up -d
docker compose up -d

View File

@@ -1,14 +1,18 @@
services:
app:
image: localhost:9999/${PROJECT_NAME}:${CI_PIPELINE_ID}
image: ${REGISTRY}/${IMAGE_NAME}:${TAG}
container_name: scheduler-app
restart: always
deploy: {} # optional (ignored by compose, boleh hapus)
volumes:
- /home/script:/home/script
mem_limit: 50m
cpus: 0.01
networks:
- scheduler-net
networks:
scheduler-net:
external: true

View File

@@ -13,25 +13,9 @@ cron.schedule(
"0 9 * * *",
async () => {
const module = "Birthday Notification";
try {
let res = await axios.get("http://36.66.3.44:7010/birthday-notification");
console.log(module, "success", res.data);
} catch (error) {
console.error(module, "error", error.message);
}
},
{
timezone: "Asia/Jakarta",
}
);
cron.schedule(
"1 9 * * *",
async () => {
const module = "Workanniversary";
try {
let res = await axios.get(
"http://36.66.3.44:7010/workanniversary-notification"
"http://email-notification:9997/birthday-notification",
);
console.log(module, "success", res.data);
} catch (error) {
@@ -40,7 +24,25 @@ cron.schedule(
},
{
timezone: "Asia/Jakarta",
}
},
);
cron.schedule(
"1 9 * * *",
async () => {
const module = "Workanniversary";
try {
let res = await axios.get(
"http://email-notification:9997/workanniversary-notification",
);
console.log(module, "success", res.data);
} catch (error) {
console.error(module, "error", error.message);
}
},
{
timezone: "Asia/Jakarta",
},
);
app.use((req, res) => {