This project includes Dockerfiles for containerization.
-
Build the image:
docker build -t my-astro-static-app -f Dockerfile.static . -
Run the container:
docker run -p 8080:80 my-astro-static-app
Access the site at
http://localhost:8080.
Ensure you have configured Astro for SSR with the Node adapter first (pnpm astro add node).
-
Build the image:
docker build -t my-astro-ssr-app -f Dockerfile.ssr . -
Run the container:
docker run -p 4321:4321 my-astro-ssr-app
Access the site at
http://localhost:4321.