mirror of
https://github.com/PretendoNetwork/Yamamura.git
synced 2024-05-31 19:17:50 -04:00
dockerize yamamura
This commit is contained in:
parent
5563cb5e10
commit
c88c8c2533
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
.git
|
||||
config.json
|
15
Dockerfile
Normal file
15
Dockerfile
Normal 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
12
docker/entrypoint.sh
Normal 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
|
Loading…
Reference in a new issue