#Explanation:
#SMTP_ settings should be uncommented and configured if you want to have servicebot send emails
#CERTIFICATES and the certificate volume should be uncommented when you get SSL certs, enter path to
version: '2'
services:
  ebilling:
    image: vbosstech/ebilling
    environment:
      POSTGRES_DB_PORT : "5432"
      POSTGRES_DB_HOST : "db"
      POSTGRES_DB_USER : "ebilling"
      POSTGRES_DB_PASSWORD : "vboss.tech"
      POSTGRES_DB_NAME : "ebilling"
#      CERTIFICATES: "./ssl/"
#      SMTP_HOST : 'localhost'
#      SMTP_USER : 'postmaster@localhost'
#      SMTP_PASSWORD : 'password'
#      SMTP_PORT : '587'
      PORT : "3000"
    volumes:
      - upload-data:/usr/src/app/uploads
      - environment-file:/usr/src/app/env
#      - /path/to/ssl/certs/on/server:/usr/src/app/ssl
    links:
      - db
    ports:
      - "3334:3000"
#      - "443:3001"
    command: ["sh", "-c", "node /usr/src/app/bin/wait-for-it.js db 5432  && npm run-script start"]
  db:
    image: postgres
    environment:
      POSTGRES_USER : "ebilling"
      POSTGRES_PASSWORD : "vboss.tech"
      POSTGRES_DB : "ebilling"
    volumes:
      - db-data:/var/lib/postgresql/data
    expose:
      - "5432"
volumes:
  upload-data:
  environment-file:
  db-data:
