-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
39 lines (38 loc) · 1.22 KB
/
compose.yaml
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
30
31
32
33
34
35
36
37
38
39
# Run the line before the first run
# git clone --progress --verbose https://github.com/TBMPQF/TBM_CPU_V2.git /data
services:
bot:
restart: unless-stopped
image: node:lts-alpine
container_name: tbm-cpu
hostname: tbm-cpu
labels:
diun.enable: true
diun.watch_repos: true
environment:
PUID: 1000
PGID: 100
TZ: Europe/Paris
volumes:
- /${DOCKER_DATA_DIRECTORY}/repos/home-docker/timezone:/etc/timezone:ro
- tbm-cpu:/data
env_file:
- stack.env
command:
- sh
- -c
- >
cd /data &&
apk add --no-cache ffmpeg git py3-pip &&
wget -qO- https://raw.githubusercontent.com/Nicolas-mahe/Bot-Discord/refs/heads/main/init-repos.sh | sh &&
git reset --hard && git pull origin main && git checkout ${COMMIT_REF} &&
chmod +x /data/CreateConfig.sh && /data/CreateConfig.sh &&
node /data/index.js > >(awk '{ print strftime("%d/%m_%Hh%Mm%Ss"), $0; fflush(); }' | tee -a /data/logs/current_output.log) 2> >(awk '{ print strftime("%d/%m_%Hh%Mm%Ss"), $0; fflush(); }' | tee -a /data/logs/current_error.log >&2)
networks:
- tbm-cpu
volumes:
tbm-cpu:
name: tbm_cpu
networks:
tbm-cpu:
name: tbm-cpu