Skip to content

Conversation

@sonarta
Copy link
Contributor

@sonarta sonarta commented Oct 11, 2025

Hi, this PR enhances the Docker setup to allow the host port to be configured dynamically.

The Problem

Currently, the docker-compose.yml file has the host port hardcoded as 3000 in the ports mapping ("3000:3000").

This becomes an issue in certain deployment environments (like Coolify, Dokploy, etc.) where the docker-compose.yml file is often read-only. In such cases, users cannot easily change the host port if 3000 is already in use, as they can only modify environment variables.

The Solution

This change updates the port mapping in docker-compose.yml to use an environment variable:

-    ports:
-      - "3000:3000"
+    ports:
+      - "${PORT:-3000}:3000"

This implementation:

  • Uses the value of the $PORT environment variable for the host port.
  • Falls back to 3000 if the $PORT variable is not set, ensuring backward compatibility for existing users.

This provides greater flexibility for deploying the application without introducing any breaking changes.

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

Successfully merging this pull request may close these issues.

1 participant