use separate dockerfiles for each container

This commit is contained in:
Chris Grimmett 2024-02-02 18:31:57 -08:00
parent 47e5919893
commit 59da569c96
2 changed files with 8 additions and 2 deletions

View File

@ -17,3 +17,9 @@ WORKDIR /app
COPY --from=build /usr/src/next /app
CMD ["pnpm", "run", "dev"]
FROM base AS prod
WORKDIR /app
COPY --from=build /usr/src/next /app
COPY ./packages/next/app.json /app
ENTRYPOINT ["pnpm"]
CMD ["start"]

View File

@ -54,7 +54,7 @@ services:
image: fp-strapi:14
build:
context: ./packages/strapi
dockerfile: Dockerfile
dockerfile: Dockerfile.strapi
restart: on-failure
depends_on:
- db
@ -110,7 +110,7 @@ services:
container_name: fp-next
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.next
target: dev
restart: on-failure
environment: