Documenting how I setup my VOIP suite dockers.

Here is the YAML

version: "3"

services:
  mongodb:
    image: mongo
    volumes:
      - /mnt/user/appdata/voip/db:/data/db
  voip:
    build: .
    ports:
      - "3001:3000" 
    depends_on:
      - mongodb

Here are the .env variables

DB = 'mongodb://mongodb:27017/'
PORT = 3000
BASE_URL = 'https://the.domain.wanted/'
COOKIE_KEY = 4c51325yte55rgae984hvs4780gtsRH5ygrs54r5Hr4adRSjgg66y8634
SIGNUPS = off #need this on for the first go
NODE_OPTIONS = --max_old_space_size=460
HTTPS = false #I use reverse proxy for TLS

But first you need to setup the voip container stuff. Basically there is no Docker image so we are creating one here.

create a file called “dockerfile” and add the following:

FROM node:12
ENV DEBIAN_FRONTEND noninteractive
RUN apt install git
RUN git clone https://github.com/mursec/VoIP.git
WORKDIR /VoIP
COPY .env /VoIP/
RUN npm install
EXPOSE 3000
CMD [ "node", "app.js" ]

So in your docker-compose folder you should have these files:

.env
docker-compose.yaml
dockerfile

After that you can run docker-compose up -d and you are on your way!