From 8a499a7d72da288712fdda1b8d485e3ef1802ab9 Mon Sep 17 00:00:00 2001 From: Lio Young Date: Thu, 13 May 2021 14:50:03 +0200 Subject: [PATCH] add docker compose files --- Dockerfile | 18 ++++++++++++++++++ docker-compose.yml | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cddb33e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:16-alpine + +LABEL MAINTAINER="Lio " + +RUN apk update && apk add git ca-certificates + +WORKDIR /opt/thaldrin +COPY . . +RUN apk add --no-cache git +RUN npm i -g typescript +RUN rm -rf build + +RUN tsc --sourceMap false + +RUN rm -rf src +RUN npm cache clean --force + +ENTRYPOINT [ "npm", "run" "start"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5c0a8a3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3.8" +services: + prometheus: + container_name: prometheus + build: ./lantern/prometheus + restart: always + networks: + - lantern + volumes: + - ./config.ts:/opt/thaldrin/config.ts + bot: + container_name: thaldrin + restart: always + build: . + depends_on: + - prometheus + networks: + - lantern +networks: + lantern: + internal: true