From 6bc8a6dbfa5baa4e3594aa1e053d7b1c614e4fd3 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Mon, 25 Nov 2024 00:05:13 +0100 Subject: [PATCH] dockerize --- Dockerfile | 22 ++++++++++++++++++++++ compose.yaml | 16 ++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Dockerfile create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3e108b3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM docker.io/debian:buster-slim AS build +WORKDIR /app + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y curl python2 build-essential && rm -rf /var/lib/apt/lists/* + +RUN curl https://install.meteor.com/?release=1.3 | sh + +COPY .meteor/packages .meteor/versions .meteor/release ./.meteor/ + +ENV NODE_TLS_REJECT_UNAUTHORIZED=0 +RUN meteor list # Maybe you didn't expect the `list` subcommand to install dependencies. In that case, we have something in common. + +COPY client client +COPY public public +COPY server server + +RUN meteor build /dist --directory +RUN cd /dist/bundle/programs/server && meteor npm install --production + +WORKDIR /dist/bundle +CMD ["meteor", "node", "main.js"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..afe4d28 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,16 @@ +services: + meta-tv: + build: . + init: true + environment: + - MONGO_URL=mongodb://tv:tv@mongo:27017/ + - ROOT_URL=http://localhost:3000 + - PORT=3000 + ports: ["3000:3000"] + mongo: + image: docker.io/mongo:3.0 + environment: + - MONGO_INITDB_ROOT_USERNAME=tv + - MONGO_INITDB_ROOT_PASSWORD=tv + - MONGO_INITDB_DATABASE=tv + ports: ["27017:27017"]