add docker support

This commit is contained in:
Th0rOnDoR 2024-08-24 09:10:51 +02:00
parent a61815e9e7
commit c2d9709bdd
3 changed files with 17 additions and 1 deletions

11
Dockerfile Normal file
View file

@ -0,0 +1,11 @@
FROM denoland/deno:debian
RUN mkdir /app
WORKDIR /app
COPY . ./
RUN chmod +x ./run.sh
RUN chmod +x ./src/bot.ts
ENTRYPOINT [ "./run.sh" ]

5
docker.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
docker stop ruche-manager
docker remove ruche-manager
docker build . --tag ruche-manager/ruche-manager:latest
docker run -d --name ruche-manager --restart unless-stopped ruche-manager/ruche-manager:latest

2
run.sh
View file

@ -6,4 +6,4 @@ if ! [ -f ./token ]
then echo "ERROR : Needs discord API token in ./token" && exit then echo "ERROR : Needs discord API token in ./token" && exit
fi fi
DEBUG=871777993922588712 ./src/bot.ts ./token DEBUG=871777993922588712 ./src/bot.ts ./token