add docker compose files

This commit is contained in:
Lio Young 2021-05-13 14:50:03 +02:00
parent 7e20746b25
commit 8a499a7d72
No known key found for this signature in database
GPG Key ID: 789795A11879E169
2 changed files with 39 additions and 0 deletions

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:16-alpine
LABEL MAINTAINER="Lio <lion@himbo.cat>"
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"]

21
docker-compose.yml Normal file
View File

@ -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