version: "2.4"

services:
  node_server:
    container_name: node_server
    image: node:14.15.0
    user: "node"
    restart: unless-stopped
    working_dir: /home/node/app
    environment:
      NODE_ENV: production
      # use this if you are using https://hub.docker.com/r/jwilder/nginx-proxy/
      # VIRTUAL_HOST: DOMAIN_NAME_HERE
      # use this if you are using https://hub.docker.com/r/jwilder/nginx-proxy/
      # CERT_NAME: CERT_NAME_HERE
    volumes:
      - ./:/home/node/app
    # uncomment this part if you wanna run it behind a reverse proxy like nginx
    # expose:
    #   - "4002"
    # use this part if it runs directly without reverse proxy
    # ports:
    #   - "4002:4002"
    #
    command: "node --unhandled-rejections=strict dist/index.js"
    # command: "npm install"
    #
# uncomment below lines just in production
# networks:
#   default:
#     external:
#       name: nginx-proxy
