From de236dfd30092f3413bb6216cd32065976b1e6e6 Mon Sep 17 00:00:00 2001 From: Vylpes Date: Sat, 5 Feb 2022 21:09:27 +0000 Subject: [PATCH] Containerise bot (#107) --- .dockerignore | 11 +++++++++++ Dockerfile | 15 +++++++++++++++ docker-compose.yml | 4 ++++ 3 files changed, 30 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0e28e03 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +node_modules/ +tests/ +coverage/ +.github/ +.gitlab/ + +.env.template +.gitlab-ci.yml +jest.config.js +jest.setup.js +README.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..51e8b21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Create app and work directory +FROM node:16 +WORKDIR /vylbot + +# Install dependencies +COPY package.json . +COPY yarn.lock . +RUN yarn install + +# Bundle app source +COPY . . +RUN yarn build + +# Run the app source +CMD [ "yarn", "start" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..da68dfd --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,4 @@ +version: "3.9" +services: + discord: + build: . \ No newline at end of file