-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docker): docker cannot build (#49)
- Loading branch information
Showing
3 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,8 @@ dist/ | |
# generated types | ||
.astro/ | ||
|
||
.git/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
FROM node:lts AS runtime | ||
FROM node:20-bookworm-slim AS runtime | ||
WORKDIR /app | ||
|
||
COPY . . | ||
COPY package.json ./ | ||
RUN npm install --ignore-scripts | ||
|
||
RUN npm install | ||
RUN npm run build | ||
COPY . . | ||
COPY scripts/docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
ENV HOST=0.0.0.0 | ||
ENV PORT=8080 | ||
EXPOSE 8080 | ||
CMD node ./dist/server/entry.mjs | ||
ENTRYPOINT [ "sh" ] | ||
CMD [ "/docker-entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
cd /app | ||
|
||
npm run build | ||
|
||
node /app/dist/server/entry.mjs |