mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: unify backend and frontend servers (#3)
* refactor: unify backend and frontend servers * refactor: correct paths for openapi & drizzle * refactor: move api-client to client * fix: drizzle paths * chore: fix linting issues * fix: form reset issue
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -45,15 +45,12 @@ WORKDIR /app
|
||||
COPY --from=deps /deps/restic /usr/local/bin/restic
|
||||
COPY --from=deps /deps/rclone /usr/local/bin/rclone
|
||||
COPY ./package.json ./bun.lock ./
|
||||
COPY ./packages/schemas/package.json ./packages/schemas/package.json
|
||||
COPY ./apps/client/package.json ./apps/client/package.json
|
||||
COPY ./apps/server/package.json ./apps/server/package.json
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 4096
|
||||
|
||||
CMD ["bun", "run", "dev"]
|
||||
|
||||
@@ -65,13 +62,12 @@ FROM oven/bun:${BUN_VERSION} AS builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./package.json ./bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY ./packages/schemas/package.json ./packages/schemas/package.json
|
||||
COPY ./apps/client/package.json ./apps/client/package.json
|
||||
COPY ./apps/server/package.json ./apps/server/package.json
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bun run build
|
||||
@@ -82,16 +78,19 @@ ENV NODE_ENV="production"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/package.json ./
|
||||
RUN bun install --production --frozen-lockfile
|
||||
|
||||
COPY --from=deps /deps/restic /usr/local/bin/restic
|
||||
COPY --from=deps /deps/rclone /usr/local/bin/rclone
|
||||
COPY --from=builder /app/apps/server/dist ./
|
||||
COPY --from=builder /app/apps/server/drizzle ./assets/migrations
|
||||
COPY --from=builder /app/apps/client/dist/client ./assets/frontend
|
||||
COPY --from=builder /app/dist/client ./dist/client
|
||||
COPY --from=builder /app/dist/server ./dist/server
|
||||
COPY --from=builder /app/app/drizzle ./assets/migrations
|
||||
|
||||
# Include third-party licenses and attribution
|
||||
COPY ./LICENSES ./LICENSES
|
||||
COPY ./NOTICES.md ./NOTICES.md
|
||||
COPY ./LICENSE ./LICENSE.md
|
||||
|
||||
CMD ["bun", "./index.js"]
|
||||
CMD ["bun", "run", "start"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user