diff --git a/Dockerfile b/Dockerfile index 49cc3221c..1fbca5760 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,25 @@ FROM node:alpine AS base RUN ["npm", "install", "-g", "turbo@latest"] +# datapuller +FROM base AS datapuller-builder +WORKDIR /datapuller +COPY . . +RUN ["turbo", "prune", "datapuller", "--docker"] + +FROM base AS datapuller-dev +WORKDIR /datapuller + +COPY --from=datapuller-builder /datapuller/out/json/ . +COPY --from=datapuller-builder /datapuller/out/package-lock.json ./package-lock.json +RUN ["npm", "install"] + +COPY --from=datapuller-builder /datapuller/out/full/ . +ENTRYPOINT ["turbo", "run", "course", "--filter=datapuller"] + +FROM datapuller-dev AS datapuller-prod +ENTRYPOINT ["turbo", "run", "course", "--filter=datapuller", "--env-mode=loose"] + # backend FROM base AS backend-builder WORKDIR /backend diff --git a/docker-compose.yml b/docker-compose.yml index 9131e6041..3df8dff6d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,18 @@ networks: bt: name: bt services: + datapuller: + build: + context: . + target: datapuller-dev + depends_on: + - mongodb + networks: + - bt + restart: always + volumes: + - ./apps/datapuller/src:/datapuller/apps/datapuller/src + - ./.env:/datapuller/apps/datapuller/.env backend: build: context: . diff --git a/turbo.json b/turbo.json index ac14f4a15..6fb072c4d 100644 --- a/turbo.json +++ b/turbo.json @@ -14,6 +14,9 @@ "dist/**" ] }, + "course": { + "cache": false + }, "generate": { "outputs": [ "generated-types/**"