Use bind mount for dev container

This commit is contained in:
tobias 2024-06-23 10:32:21 +02:00
parent ace6e50b73
commit bc6c4ddde7
2 changed files with 9 additions and 9 deletions

View File

@ -1,18 +1,10 @@
# Build stage
FROM node:20-slim as base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /base
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
# Development
# Local Development
FROM base AS dev
ENTRYPOINT []
CMD ["pnpm", "dev:next"]
@ -20,6 +12,13 @@ CMD ["pnpm", "dev:next"]
# Production
FROM base AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
ENV NODE_ENV=production
RUN pnpm build

View File

@ -19,6 +19,7 @@ services:
- "MONGODB_URI=mongodb://${MONGO_USER}:${MONGO_PASSWORD}@mongo:27017"
volumes:
- /base/media
- ./:/base
networks:
- internal
ports: