diff --git a/Dockerfile b/Dockerfile index 594083f39..36b3739bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ COPY . . # Build Astro project (includes public folder in dist) RUN npm run build -# Expose port -EXPOSE 4321 +# Expose port from environment variable (default 80 for Easypanel) +EXPOSE ${PORT:-80} -# Start Astro preview server -CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4321"] +# Start Astro preview server on the correct port +CMD ["sh", "-c", "npm run preview -- --host 0.0.0.0 --port ${PORT:-80}"]