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 COPY --from=build /usr/src/next /app
CMD ["pnpm", "run", "dev"] 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 image: fp-strapi:14
build: build:
context: ./packages/strapi context: ./packages/strapi
dockerfile: Dockerfile dockerfile: Dockerfile.strapi
restart: on-failure restart: on-failure
depends_on: depends_on:
- db - db
@ -110,7 +110,7 @@ services:
container_name: fp-next container_name: fp-next
build: build:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile.next
target: dev target: dev
restart: on-failure restart: on-failure
environment: environment: