diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fa1a734 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM archlinux:latest + +RUN pacman -Syyu git nodejs npm typescript python3 --noconfirm +RUN pacman-key --init +RUN pacman-key --populate archlinux + +COPY config.json root/ +COPY build.sh root/ +COPY src root/src +COPY tsconfig.json root/ +COPY package.json root/ + +RUN ["chmod", "+x", "root/build.sh"] + +ENTRYPOINT ["./root/build.sh"] \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..c70532c --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +#!/bin/sh +cd /root/ + +mkdir galactica-bot +cp -r src /root/galactica-bot/ +cp tsconfig.json /root/galactica-bot/ +cp config.json /root/galactica-bot/ +cp package.json /root/galactica-bot/ + +cd galactica-bot +npm install --only=production +tsc && node ./dist/src/main.js \ No newline at end of file