services:
  app:
    depends_on:
      - db
    image: liberatti/nproxy:latest
    environment:
      MONGO_HOST: db
      MONGO_PORT: 27017
      MONGO_DB: nproxy
      MONGO_USER: nproxy_usr
      MONGO_PASS: "altyHK2XtTUZczYD1F4PbueJNjYlI6Z2-change-me"
      SERVERID: "nproxy-single"
      NODE_ROLE: main
      NODE_KEY: "ozP3d3m1bnRgx3yXOe6CgNwPk5EcrYzh-change-me"
    ports:
      - "80:80"
      - "443:443"
      - "5000:5000"
  db:
    image: mongodb/mongodb-community-server:7.0.1-ubuntu2204
    environment:
      MONGO_INITDB_ROOT_USERNAME: nproxy_usr
      MONGO_INITDB_ROOT_PASSWORD: "altyHK2XtTUZczYD1F4PbueJNjYlI6Z2-change-me"
    command: --quiet
    logging:
      driver: "none"
    volumes:
      - mongo-data:/data/db

volumes:
  mongo-data:
    driver: local