version: '3.1'
services:
  ketr.chat:
    volumes:
      - /etc/letsencrypt:/etc/letsencrypt:ro         # Use host web keys
      - ./logs:/home/user/logs                   #
      - ./db:/home/user/db
     # Hot mount client and server for dynamic changes in DEVELOPMENT
      - ./scripts:/opt/scripts                   # Hot update via bind
      - ./server/package.json:/home/user/server/package.json
      - ./server/package-lock.json:/home/user/server/package-lock.json
      - ./server/app.js:/home/user/server/app.js
      - ./server/config:/home/user/server/config
      - ./server/db:/home/user/server/db
      - ./server/routes:/home/user/server/routes
      - ./server/lib:/home/user/server/lib
      - ./server/nginx.conf:/etc/nginx/sites-available/default
      - ./client/package.json:/home/user/client/package.json
      - ./client/package-lock.json:/home/user/client/package-lock.json
      - ./client/build:/home/user/client/build
      - ./client/public:/home/user/client/public
      - ./client/src:/home/user/client/src
    ports:
      - 127.0.0.1:19876:443  # Main app entrypoint
      - 127.0.0.1:14200:4200 # shellinabox
