build worker first
ci / build (push) Failing after 10m19s Details

This commit is contained in:
CJ_Clippy 2024-07-18 12:48:52 -08:00
parent b0530326c1
commit bacf28f26b
2 changed files with 16 additions and 14 deletions

View File

@ -14,6 +14,16 @@ jobs:
name: Check out code name: Check out code
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/worker
with:
image: futureporn/worker
tags: latest
registry: gitea.futureporn.net
dockerfile: d.worker.dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v6 - uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/scout name: Build futureporn/scout
with: with:
@ -44,13 +54,3 @@ jobs:
dockerfile: d.strapi.dockerfile dockerfile: d.strapi.dockerfile
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build futureporn/worker
with:
image: futureporn/worker
tags: latest
registry: gitea.futureporn.net
dockerfile: d.worker.dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

View File

@ -19,13 +19,13 @@
## this way, when we're building the various @futureporn library-type packages, we don't have to filter and COPY the dependency packages one-by-one. ## this way, when we're building the various @futureporn library-type packages, we don't have to filter and COPY the dependency packages one-by-one.
## instead, we add the entire `packages/*` directory and then move on to the next step. ## instead, we add the entire `packages/*` directory and then move on to the next step.
FROM node:20 as base FROM node:20 AS base
ENV PNPM_HOME="/pnpm" ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH" ENV PATH="$PNPM_HOME:$PATH"
WORKDIR /app WORKDIR /app
RUN corepack enable && corepack prepare pnpm@9.2.0 --activate RUN corepack enable && corepack prepare pnpm@9.2.0 --activate
FROM base as build FROM base AS build
WORKDIR /app WORKDIR /app
RUN mkdir -p /app/packages/temporal-worker && mkdir -p /prod/temporal-worker RUN mkdir -p /app/packages/temporal-worker && mkdir -p /prod/temporal-worker
@ -53,14 +53,16 @@ COPY ./packages/types/ ./packages/types/
COPY ./packages/utils/ ./packages/utils/ COPY ./packages/utils/ ./packages/utils/
## Transpile TS into JS ## Transpile TS into JS
## we have to build temporal-workflows first because other packages depend on it's built js files ## we have to build @futureporn/image first because other packages depend on it's build js files
## next we have to build temporal-workflows because other packages depend on it's built js files
RUN pnpm --filter=@futureporn/image build
RUN pnpm --filter=@futureporn/temporal-workflows build RUN pnpm --filter=@futureporn/temporal-workflows build
RUN pnpm --filter=!@futureporn/temporal-workflows -r build RUN pnpm --filter=!@futureporn/temporal-workflows -r build
## Deploy (copy all production code into one place) ## Deploy (copy all production code into one place)
RUN pnpm deploy --filter=@futureporn/temporal-worker --prod /prod/temporal-worker RUN pnpm deploy --filter=@futureporn/temporal-worker --prod /prod/temporal-worker
FROM base as worker FROM base AS worker
COPY --from=build /prod/temporal-worker . COPY --from=build /prod/temporal-worker .
RUN ls -la . RUN ls -la .
ENTRYPOINT ["pnpm", "start"] ENTRYPOINT ["pnpm", "start"]