Skip to content

Commit

Permalink
Added docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
jebediah47 committed Dec 7, 2021
1 parent 3d6609c commit fb99700
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fb99700

Please sign in to comment.