I am trying to deploy a Strapi app that requires multiple secrets during the builds. I am following the official Build Secrets doc but keep getting No such file or directory
for the last 4 secrets from the command. Is this the right usage for passing multiple secrets?
// Command
flyctl deploy \
--build-secret DATABASE_URL=XXX \
--build-secret APP_KEYS=XXX \
--build-secret API_TOKEN_SALT=XXX \
--build-secret ADMIN_JWT_SECRET=XXX \
--build-secret JWT_SECRET=XXX
// Error
> [builder 9/9] RUN --mount=type=secret,id=DATABASE_URL DATABASE_URL="$(cat /run/secrets/DATABASE_URL)" --mount=type=secret,id=APP_KEYS APP_KEYS="$(cat /run/secrets/APP_KEYS)" --mount=type=secret,id=API_TOKEN_SALT API_TOKEN_SALT="$(cat /run/secrets/API_TOKEN_SALT)" --mount=type=secret,id=ADMIN_JWT_SECRET ADMIN_JWT_SECRET="$(cat /run/secrets/ADMIN_JWT_SECRET)" --mount=type=secret,id=JWT_SECRET JWT_SECRET="$(cat /run/secrets/JWT_SECRET)" npm run build:
#12 0.355 cat: /run/secrets/APP_KEYS: No such file or directory
#12 0.355 cat: /run/secrets/API_TOKEN_SALT: No such file or directory
#12 0.356 cat: /run/secrets/ADMIN_JWT_SECRET: No such file or directory
#12 0.357 cat: /run/secrets/JWT_SECRET: No such file or directory
#12 0.357 /bin/sh: 1: --mount=type=secret,id=APP_KEYS: not found
// Dockerfile
RUN --mount=type=secret,id=DATABASE_URL DATABASE_URL="$(cat /run/secrets/DATABASE_URL)" \
--mount=type=secret,id=APP_KEYS APP_KEYS="$(cat /run/secrets/APP_KEYS)" \
--mount=type=secret,id=API_TOKEN_SALT API_TOKEN_SALT="$(cat /run/secrets/API_TOKEN_SALT)" \
--mount=type=secret,id=ADMIN_JWT_SECRET ADMIN_JWT_SECRET="$(cat /run/secrets/ADMIN_JWT_SECRET)" \
--mount=type=secret,id=JWT_SECRET JWT_SECRET="$(cat /run/secrets/JWT_SECRET)" \
npm run build