Move Dockerfile, entrypoint.sh, docker-compose.yml to repo root
Komodo's build ran `docker build -f Dockerfile .` from inside docker/, which set the build context to docker/ — a directory that contains neither package.json nor a nested docker/entrypoint.sh, so both COPY steps failed. Moving these three files to the repo root makes `docker build .` from the repo root work with default Komodo settings (no per-build-tool config). - Dockerfile: update COPY entrypoint.sh path (drops docker/ prefix) - docker-compose.yml: build.context = . (drops dockerfile: override) - README.md: docker compose build (drops -f docker/docker-compose.yml)
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
# syntax=docker/dockerfile:1.7
|
||||
FROM node:22-alpine AS build
|
||||
|
||||
# native builds for better-sqlite3
|
||||
RUN apk add --no-cache python3 make g++ sqlite
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm install --include=dev
|
||||
|
||||
COPY . .
|
||||
RUN npm run build \
|
||||
&& npm prune --omit=dev
|
||||
|
||||
# ---- runtime ----
|
||||
FROM node:22-alpine
|
||||
|
||||
RUN apk add --no-cache sqlite tini rsync
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/build ./build
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
COPY --from=build /app/src/lib/server/db/schema.sql ./build/schema.sql
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
ENV HOST=0.0.0.0
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user