question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Platformatic DB app inside docker container (with port mapping)

See original GitHub issue

Have you any working example of Platformatic DB application using your official docker image? https://hub.docker.com/r/platformatic/platformatic

I created the Dockerfile as reported on your official docker-hub documentation:

FROM platformatic/platformatic:latest

USER root

WORKDIR /opt/demoapp
COPY migrations migrations
COPY platformatic.db.json platformatic.db.json

EXPOSE 3042

CMD ["platformatic", "db"]

then I built the docker image and run a temporarly (--rm) docker container mapping 3042 port:

docker build -t demoapp .
docker run --rm -p 3042:3042 --name demoapp demoapp

The issue is that Platformatic DB application (demoapp) seems not available opening it in your browser: http://127.0.0.1:3042

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
mcollinacommented, Dec 24, 2022

Platformat DB dashboard is enabled in platformatic.db.json but not available.

This seems like a bug

1reaction
mcollinacommented, Dec 24, 2022

Thank you so much, but why does it work also with PLT_SERVER_HOSTNAME=127.0.0.1 on Linux and Mac OS X ?

It really depends how docker is configured on Linux. On Mac it would not work.

I didn’t spot this on my first comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · platformatic/platformatic - GitHub
Contribute to platformatic/platformatic development by creating an account on GitHub. ... Platformatic DB app inside docker container (with port mapping).
Read more >
Container networking - Docker Documentation
Map TCP port 80 in the container to port 8080 on the Docker host for connections to host IP 192.168.1.100. -p 8080:80/udp, Map...
Read more >
Assigning a Port Mapping to a Running Docker Container
If we want to communicate with a Docker container from our host machine, we need to have a port mapping. Sometimes, we may...
Read more >
Exposing a port on a live Docker container - Stack Overflow
Is there a way to expose port 80 on the container and map it to port 8080 on the host, so that people...
Read more >
How To Expose or Publish Docker Ports
At times, you may need to set out some networking rules to enable smooth interaction between containers in multi-container applications or make ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found