version: '3.2'

services:
  mongo:
    image: mongo:latest
    volumes:
      - /data/db
    deploy:
      placement:
        constraints:
          - node.role == manager

  web:
    image: subjectrefresh/shortener:latest
    ports:
      - 8080:8080
    deploy:
      mode: replicated
      replicas: 6
    environment:
      NODE_ENV: production
      PORT: 8080
      SSL: 'true'
      URL: subr.pw
      REDIS_HOST: redis
      REDIS_PORT: 6379
    depends_on:
      - mongo
    secrets:
      - shortener_session_secret
    command: ["npm", "start"]

secrets:
  shortener_session_secret:
    external: true
version: '3.2'

services:
  mongo:
    image: mongo:latest
    volumes:
      - /data/db
    deploy:
      placement:
        constraints:
          - node.role == manager

  web:
    image: subjectrefresh/shortener:latest
    ports:
      - 8080:8080
    deploy:
      mode: replicated
      replicas: 6
    environment:
      NODE_ENV: production
      PORT: 80
      SSL: 'true'
      URL: subr.pw
    depends_on:
      - mongo
    secrets:
      - shortener_session_secret
    command: ["npm", "start"]

secrets:
  shortener_session_secret:
    external: true
Switch the production port and remove redis env vars
Switch the production port and remove redis env vars
