diff --git a/.dockerignore b/.dockerignore index 496ee2c..ad9f178 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,2 @@ -.DS_Store \ No newline at end of file +.DS_Store +dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index d54dc9f..eb27f50 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,11 @@ -FROM node:lts AS build +FROM node:lts AS runtime WORKDIR /app + COPY . . -RUN npm i + RUN npm run build -FROM httpd:2.4 AS runtime -COPY --from=build /app/dist /usr/local/apache2/htdocs/ -EXPOSE 80 \ No newline at end of file +ENV HOST=0.0.0.0 +ENV PORT=4321 +EXPOSE 4321 +CMD node ./dist/server/entry.mjs \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs index 72337a1..afe3886 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,7 @@ import robotsTxt from 'astro-robots-txt'; import mdx from '@astrojs/mdx'; import vue from "@astrojs/vue"; import betterImageService from "astro-better-image-service"; +import node from '@astrojs/node'; export default defineConfig({ site: 'https://sudovanilla.org', @@ -75,8 +76,10 @@ export default defineConfig({ }] }), vue()], output: 'server', - server: { - port: 2014, + adapter: node({ + mode: 'standalone', + }), server: { + port: 5522, host: true }, devToolbar: { diff --git a/bun.lockb b/bun.lockb index 604c9b3..d7fb362 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 8077a91..0266ea1 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "dependencies": { "@astrojs/markdoc": "^0.11.5", "@astrojs/mdx": "^3.1.9", + "@astrojs/node": "^8.3.4", "@astrojs/partytown": "^2.1.2", "@astrojs/vue": "^4.5.2", "@iconoir/vue": "^7.10.0",