forked from na-trium-144/falling-nikochan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
29 lines (27 loc) · 777 Bytes
/
docker-compose.yml
File metadata and controls
29 lines (27 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3.9'
services:
app:
build: .
image: ghcr.io/na-trium-144/falling-nikochan/falling-nikochan:latest
container_name: falling-nikochan-app
restart: always
ports:
- "8787:8787"
env_file:
- .env
command: bun ./route/serve-bun-prod.ts
cron:
build: .
image: ghcr.io/na-trium-144/falling-nikochan/falling-nikochan:latest
container_name: falling-nikochan-cron
restart: on-failure
env_file:
- .env
# This command runs the cron job script in a loop every 15 minutes (900 seconds).
command: >
sh -c "while true; do
echo '[$(date)] Running cron job...';
bun ./route/cronjob.ts;
echo '[$(date)] Cron job finished. Sleeping for 15 minutes.';
sleep 900;
done"