version: "3.1"
services:
  ketr.chat:
    image: ketr.chat:development
    env_file:
      - .env
    build:
      context: .
      dockerfile: Dockerfile
      args:
        DEVELOPMENT: 1
    stdin_open: true # Needed for react-scripts
    tty: true        # Needed for react-scripts
    restart: always
    volumes:
      - /etc/nginx/ssl:/etc/nginx/ssl:ro         # Use host web keys
      - ./logs:/home/user/logs                   #
    ports:
      - 127.0.0.1:19876:80

  ketr.chat-production:
    image: ketr.chat:production
    env_file:
      - .env
    build:
      context: .
      dockerfile: Dockerfile
      args:
        DEVELOPMENT:
    stdin_open: true # Needed for react-scripts
    tty: true        # Needed for react-scripts
    restart: always
    volumes:
      - /etc/nginx/ssl:/etc/nginx/ssl:ro         # Use host web keys
      - ./scripts:/opt/scripts                   # Hot update via bind
    ports:
      - 127.0.0.1:19876:80

