Docker for dev

This commit is contained in:
2023-11-13 13:24:50 +09:00
parent 3c45282455
commit dd76a37982
3 changed files with 8 additions and 4 deletions

View File

@ -11,8 +11,8 @@ RUN yarn --frozen-lockfile
FROM base AS builder
WORKDIR /app
COPY .env.dev.sample .env
COPY . .
COPY .env.dev.sample .env
ENV NEXT_TELEMETRY_DISABLED 0
RUN yarn upgrade
RUN npx prisma generate
@ -40,7 +40,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/prisma ./prisma
COPY --from=builder --chown=nextjs:nodejs /app/start.sh .
USER nextjs
EXPOSE 3000
ENV PORT 3000
EXPOSE 3100
ENV PORT 3100
CMD ["sh", "start.sh"]

View File

@ -16,7 +16,7 @@ services:
dockerfile: docker/dev/Dockerfile
image: learnsteam/learnsteam-quiz:dev
ports:
- "3100:3000"
- "3100:3100"
environment:
DB_HOST: db
DB_PORT: 3306