- Newest
- Most votes
- Most comments
Lightsail containers don't contain the DNS magic that docker-compose has. You'll need to tell Lightsail about the port and expose it internally.
Change nginx.conf
fastcgi_pass php:9000;
-> fastcgi_pass localhost:9000;
Add to container.yml
php:
"ports": {
"9000": "HTTP"
}
thank you for the answer @mreferre
For the sake of completeness, i would like to refer to the section in the lightsail documentation i just became aware of: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-container-services -> "Private domain"
To access a specific container using the private domain of your container service, you must specify the open port of the container that will accept your connection request. You do this by formatting the domain of your request as
<ServiceName>.service.local:<PortNumber>
, in which<ServiceName>
is the name of your container service and<PortNumber>
is the open port of the container that you wish to connect to. For example, if you create a deployment on your container service namedcontainer-service-1
, and you specify a Redis container with port6379
open, then you should format the domain of your request ascontainer-service-1.service.local:6379
.
Relevant content
- asked 16 days ago
- asked 8 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago