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

BUG: Docker API access issues in local env #609

Open
Luka-Loncar opened this issue Oct 22, 2024 · 2 comments
Open

BUG: Docker API access issues in local env #609

Luka-Loncar opened this issue Oct 22, 2024 · 2 comments

Comments

@Luka-Loncar
Copy link

Description

  • Users are experiencing issues accessing the API when running the application through Docker, despite having the proper environment configuration.
  • The API endpoints at localhost:8080 are not accessible.

Current Configuration

  • Environment includes API_ENABLED=true in .env file
  • Running with docker-compose up -d

Observed Behavior

  • API endpoints are not accessible at localhost:8080
  • Frontend can start but cannot make API calls

Steps to Reproduce

  • Set up Docker environment with provided configuration
  • Include API_ENABLED=true in .env file
  • Run docker-compose up -d
  • Attempt to access API endpoints at localhost:8080

Impact

  • Blocking local development setup for team members
  • Similar issues reported by customer attempting integration
@mcamou
Copy link
Contributor

mcamou commented Oct 27, 2024

I've not yet done the setup to run the Oracle so I can't verify this, but this sounds like something that I've seen on certain Macs. The Docker daemon runs inside a VM called Colima, which by default does not expose any ports to the host. You need to do the following:

$ docker-compose down
$ colima stop
$ colima start --network-address
$ docker-compose up -d

While this will still not expose the port on localhost, it will assign to the VM an IP address that is visible from the host. You can find out the IP address by running colima list. In my Mac it's 192.168.108.4, so the API should be available at 192.168.108.4:8080.

Reference: StackOverflow.

@mcamou
Copy link
Contributor

mcamou commented Nov 5, 2024

I've done further testing. As long as you do the colima start --network-address bit you should be able to connect to localhost. You only need to do it once, the setting is persistent.

If this happens on something other than a Mac, then I have no idea.

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