added Docker support

This commit is contained in:
Timo Volkmann 2020-07-23 18:43:06 +02:00
parent 4e8d270eba
commit 3e7d2eb038
2 changed files with 42 additions and 0 deletions

21
Dockerfile Normal file
View File

@ -0,0 +1,21 @@
FROM node:lts-buster
ENV MONGO_URL=mongodb://garden:99009911@cloud.timovolkmann.de:27017/Smart_Garden
ENV PORT=3000
ENV NODE_ENV=production
RUN curl https://install.meteor.com/ | /bin/sh
WORKDIR /usr/app/smartgarden
COPY package*.json ./
RUN meteor npm install
COPY . .
EXPOSE 3000
CMD [ "meteor", "--unsafe-perm" ]

21
docker-compose.yml Normal file
View File

@ -0,0 +1,21 @@
version: "3"
services:
smartgarden-meteor:
image: tvm/smart_garden:latest
build: .
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.smartgarden-meteor-http.rule=Host(`smartgarden-meteor.timovolkmann.de`)
- traefik.http.routers.smartgarden-meteor-http.entrypoints=web
- traefik.http.routers.smartgarden-meteor-http.middlewares=https-redirect@file
- traefik.http.routers.smartgarden-meteor-https.rule=Host(`git.timovolkmann.de`)
- traefik.http.routers.smartgarden-meteor-https.entrypoints=web-secure
- traefik.http.routers.smartgarden-meteor-https.tls.certresolver=le
- traefik.http.services.smartgarden-meteor-service.loadbalancer.server.port=3000
- traefik.docker.network=traefik_default
networks:
traefik_default:
external: true