0

Sorry if it sounds simple, but I checked all the other answers and they were way too complicated for Docker beginner. Even worse is that caddy.community site is down for last 2 days and I have a deadline.


Basically I have 2 different docker-compose projects, and one of them has to CURL to caddy port of other project.

The one that works as API and I need to access to is from this repo: https://github.com/dunglas/symfony-docker

Networks, expose, host.internal.docker... None of them worked or just got scrambled in my head.

For reference: I need HTTP only, HTTPS is not important. This is just for local development, production should be fine. This repo works perfect by setting SERVER_NAME to be "api.localhost:80"

Zeljko
  • 5,048
  • 5
  • 36
  • 46
  • One `docker-compose.yml` needs to declare that it uses `networks:` from the other, and then it can connect to the other setup's services using their Compose service names, just as if they were in the same file. The linked question has a couple of clear examples. – David Maze Jul 24 '21 at 18:02
  • @DavidMaze That's the problem; it doesn't work. The best I got when I curl is just the headers of caddy; it is not triggering PHP at all. And I get to curl to IP address, names don't work at all. I am on Linux, if of any relevance. – Zeljko Jul 25 '21 at 11:18

0 Answers0