Looking for a docker compose template

Hey does anyone have a docker compose template with meteor v2 and a separate mongodb in the same compose file, that they can share.

my docker-compose.yml file

version: '3'

services:

  mongo:
    image: ${DOCKER_MONGODB_IMAGE:-mongo:5.0.15}
    container_name: rationalk_mongo
    restart: always
    environment:
      - MONGO_INITDB_ROOT_USERNAME=root
      - MONGO_INITDB_ROOT_PASSWORD=blabla
      - TZ=Europe/Zurich
    volumes:
      - "/home/ubuntu/db:/data/db"
      - "/home/ubuntu/db-exchange:/data/db-exchange"
    ports:
      - 27017:27017
    logging:
      options:
          max-file: 5
          max-size: 5m
    command: [ "mongod" ]

  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: rationalk_app
    restart: always
    environment:
      - ROOT_URL=http://XXXX.2222.4444/
      - NODE_ENV=production
      - TZ=Europe/Zurich
      - PORT=3000
      - MONGO_URL=mongodb://root:blabla@mongo/rationalk?authSource=admin
      - 'METEOR_SETTINGS={
          "modules": {"projects": true},
          "rKUploads":{"uploadDir":"/app/uploads"}
         }'
    volumes:
      - "./rationalk.master.latest.tar.gz:/rationalk.master.latest.tar.gz"
      - "./entry_point.sh:/entry_point.sh"
      - "/home/ubuntu/uploads:/app/uploads"
    expose:
      - "3000"
    logging:
      options:
          max-file: 5
          max-size: 5m
    command: [ "sh","/entry_point.sh" ]
    depends_on: [ "mongo" ]
  
  nginx:
    build:
      context: .
      dockerfile: nginx-Dockerfile
    container_name: rationalk_nginx
    ports:
      - 80:80
    depends_on: [ "app" ]
    logging:
      options:
          max-file: 5
          max-size: 5m
    restart: always

entry_point.sh :

#!/bin/sh
cd /app/bundle && node main.js

Dockerfile :

FROM node:14.21.2-buster
COPY rationalk.master.latest.tar.gz /app/
WORKDIR /app
RUN tar -xf rationalk.master.latest.tar.gz -C /app
RUN cd /app/bundle/programs/server && npm install --production

nginx-Dockerfile :

FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
1 Like

ahh amazing! thank you. for completeness just found this one wekan/docker-compose.yml at main · wekan/wekan · GitHub