dockerize yamamura

This commit is contained in:
mrjvs 2022-05-07 23:28:22 +02:00
parent 5563cb5e10
commit c88c8c2533
3 changed files with 29 additions and 0 deletions

2
.dockerignore Normal file
View file

@ -0,0 +1,2 @@
.git
config.json

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM node:14-alpine
RUN apk add --no-cache python3 make gcc g++
WORKDIR /app
COPY "docker/entrypoint.sh" .
COPY package*.json .
RUN npm install
COPY . .
VOLUME [ "/app/config.json" ]
CMD ["sh", "entrypoint.sh"]

12
docker/entrypoint.sh Normal file
View file

@ -0,0 +1,12 @@
#!/bin/sh
files='config.json'
for file in $files; do
if [ ! -f $file ]; then
echo "$PWD/$file file does not exist. Please mount and try again."
exit 1
fi
done
exec node src/bot.js