File tree Expand file tree Collapse file tree
ansible/roles/config/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 # config.json is committed with empty secret fields; the repo role reset it to
2828 # that clean state, so we patch the secrets in with jq (read via env, never on
2929 # the command line). DB/Redis URLs and addresses come from the committed file.
30+ # NOTE: every line here must share the same indentation. In a YAML '>' folded
31+ # scalar, a more-indented line keeps its newline, which would split the shell
32+ # command (jq program on one line, filename on the next) and fail.
3033 ansible.builtin.shell :
31- cmd : >
32- jq '.rpc.ethereumUrls=env.RPC
33- | .sentinel.proxyUrl=env.SENTINEL
34- | .app.auth.discord.clientId=env.DISCORD_ID
35- | .app.auth.discord.clientSecret=env.DISCORD
36- | .app.auth.x.clientId=env.X_ID
37- | .app.auth.x.clientSecret=env.XSECRET
38- | .app.auth.sessionPassword=env.SESSION'
34+ cmd : >-
35+ jq
36+ '.rpc.ethereumUrls=env.RPC
37+ | .sentinel.proxyUrl=env.SENTINEL
38+ | .app.auth.discord.clientId=env.DISCORD_ID
39+ | .app.auth.discord.clientSecret=env.DISCORD
40+ | .app.auth.x.clientId=env.X_ID
41+ | .app.auth.x.clientSecret=env.XSECRET
42+ | .app.auth.sessionPassword=env.SESSION'
3943 "{{ cfg }}" > "{{ cfg }}.tmp" && mv "{{ cfg }}.tmp" "{{ cfg }}"
4044 vars :
4145 cfg : " {{ app_dir }}/.environment/{{ item }}/config.json"
Original file line number Diff line number Diff line change @@ -41,11 +41,13 @@ COPY apps/web ./apps/web
4141# Load build-time env vars (NEXT_PUBLIC_* are inlined during next build)
4242RUN if [ -f ./apps/web/.env.build ]; then cp ./apps/web/.env.build ./apps/web/.env.production; fi
4343
44- # Build workspace packages first
44+ # Build workspace packages first. Prisma must be generated and @dashtec/database
45+ # built BEFORE @dashtec/shared-types, which imports @dashtec/database/types.
46+ RUN pnpm --filter @dashtec/database db:generate
47+ RUN pnpm --filter @dashtec/database build
4548RUN pnpm --filter @dashtec/logger build
4649RUN pnpm --filter @dashtec/shared-types build
4750RUN pnpm --filter @dashtec/shared-utils build
48- RUN pnpm --filter @dashtec/database build
4951RUN pnpm --filter @dashtec/contract-calls build
5052
5153# Build web app with standalone output
Original file line number Diff line number Diff line change @@ -39,11 +39,14 @@ COPY packages/aztec-rpc-sdk ./packages/aztec-rpc-sdk
3939# Copy indexer-custom source
4040COPY packages/indexer-custom ./packages/indexer-custom
4141
42- # Build workspace packages in order
42+ # Build workspace packages in order. Prisma must be generated and
43+ # @dashtec/database built BEFORE @dashtec/shared-types (which imports
44+ # @dashtec/database/types).
45+ RUN pnpm --filter @dashtec/database db:generate
46+ RUN pnpm --filter @dashtec/database build
4347RUN pnpm --filter @dashtec/logger build
4448RUN pnpm --filter @dashtec/shared-types build
4549RUN pnpm --filter @dashtec/shared-utils build
46- RUN pnpm --filter @dashtec/database build
4750RUN pnpm --filter @dashtec/aztec-rpc-sdk build
4851RUN pnpm --filter @dashtec/indexer-custom build
4952
Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ FROM deps AS build
2828WORKDIR /app
2929COPY . .
3030
31- # Build all compiled packages (tsup / prisma)
31+ # Build all compiled packages (tsup / prisma). Prisma must be generated and
32+ # @dashtec/database built BEFORE @dashtec/shared-types (which imports
33+ # @dashtec/database/types).
34+ RUN pnpm -r --filter ./packages/database db:generate
35+ RUN pnpm -r --filter ./packages/database build
3236RUN pnpm -r --filter ./packages/logger build
3337RUN pnpm -r --filter ./packages/shared-types build
3438RUN pnpm -r --filter ./packages/shared-utils build
35- RUN pnpm -r --filter ./packages/database build
36- RUN pnpm -r --filter ./packages/database db:generate
3739
3840# ---------------- runner ----------------
3941FROM base AS runner
Original file line number Diff line number Diff line change @@ -41,9 +41,11 @@ COPY packages/indexer-ponder ./packages/indexer-ponder
4141# Copy materializer source
4242COPY packages/materializer ./packages/materializer
4343
44- # Build workspace packages in dependency order
45- RUN pnpm --filter @dashtec/logger build
44+ # Build workspace packages in dependency order. Prisma must be generated before
45+ # @dashtec/database is built, and database before @dashtec/shared-types.
46+ RUN pnpm --filter @dashtec/database db:generate
4647RUN pnpm --filter @dashtec/database build
48+ RUN pnpm --filter @dashtec/logger build
4749RUN pnpm --filter @dashtec/shared-types build
4850RUN pnpm --filter @dashtec/shared-utils build
4951RUN pnpm --filter @dashtec/materializer build
You can’t perform that action at this time.
0 commit comments