I'm trying to develop astro.js inside docker.
Here's my docker-compose.yml
file:
version: "3.9"
services:
site:
image: node:lts-bullseye-slim
ports:
- 3000:3000
volumes:
- /project:/project
command: >
sh -c
"
cd /project
&& npm run install
&& npm run dev &
tail -f /dev/null
"
And I can see that astro is running inside the docker. I can curl localhost:3000
from inside the docker container and it shows me the default page of the astro project.
However, when I try to reach localhost:3000
on my laptop, it gives ms ERR_EMPTY_RESPONSE
error.
What should I do?
Update:
/project
is just a very simple typical astro
application created with npx create-astro
command.