Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Feature Request} Allow environmental variable to change internal port number #65

Open
AmIBeingObtuse opened this issue Jan 8, 2025 · 4 comments

Comments

@AmIBeingObtuse
Copy link

Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Enable an environmental variable in the compose to change the internal port from 3000 to anything as this will help users running the project in host networking mode.
Describe alternatives you've considered
None. Please Advise if this is already possible in host networking mode.
Additional context
Create an environmental variable for the compose such as INTERNAL_PORT=3000 so we can change it.

Thanks. Amazing project!

@clusterzx
Copy link
Owner

clusterzx commented Jan 8, 2025

You can change it right at the command?

docker run -d --name paperless-ai --network bridge -v paperless-ai_data:/app/data -p 3000:3000 --restart unless-stopped clusterzx/paperless-ai

  paperless-ai:
    image: clusterzx/paperless-ai
    container_name: paperless-ai
    network_mode: bridge
    volumes:
      - paperless-ai_data:/app/data
    ports:
      - "3000:3000"
    restart: unless-stopped

volumes:
  paperless-ai_data:
  

@clusterzx
Copy link
Owner

Ah sorry, I misread your issue. You can manually edit the server.js at the bottom.

@clusterzx
Copy link
Owner

clusterzx commented Jan 8, 2025

  try {
    await initializeDataDirectory();
    app.listen(3000, () => {
      console.log('Server running on port 3000');
      startScanning();
    });
  } catch (error) {
    console.error('Failed to initialize server:', error);
    process.exit(1);
  }
};

@AmIBeingObtuse
Copy link
Author

Thanks for the info. If it could still be put on the roadmap I think it would be easier for config especially inexperienced users. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants