Hello everyone - trying to evaluate strapi.
Locally it runs fine, running Node 18.16.0 - starting with yarn develop
When I try to run a container image, the build runs seemingly fine i.e. there are no errors that I notice.
My Dockerfile is very generic:
FROM node:18-alpine
# Installing libvips-dev for sharp Compatability
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
ARG NODE_ENV=development
ENV NODE_ENV=${NODE_ENV}
WORKDIR /opt/
COPY ./package.json ./yarn.lock ./
ENV PATH /opt/node_modules/.bin:$PATH
RUN yarn config set network-timeout 600000 -g && yarn install
WORKDIR /opt/app
COPY ./ .
RUN yarn build
EXPOSE 1337
CMD ["yarn", "develop"]
When I run the container I get a (for me) non-descript error:
Error: knex: Required configuration option 'client' is missing.
at new Client (/opt/node_modules/knex/lib/client.js:58:13)
at knex (/opt/node_modules/knex/lib/knex-builder/Knex.js:16:28)
at createConnection (/opt/node_modules/@strapi/database/lib/connection.js:55:24)
at new Database (/opt/node_modules/@strapi/database/lib/index.js:34:23)
at Database.init (/opt/node_modules/@strapi/database/lib/index.js:123:14)
at Strapi.bootstrap (/opt/node_modules/@strapi/strapi/lib/Strapi.js:420:30)
at Strapi.load (/opt/node_modules/@strapi/strapi/lib/Strapi.js:491:16)
at async workerProcess (/opt/node_modules/@strapi/strapi/lib/commands/actions/develop/action.js:110:26)
When I run with a node:16 base image the error changes to
Error: knex: Required configuration option 'client' is missing.
at new Client (/opt/node_modules/knex/lib/client.js:58:13)
at knex (/opt/node_modules/knex/lib/knex-builder/Knex.js:16:28)
at createConnection (/opt/node_modules/@strapi/database/lib/connection.js:55:24)
at new Database (/opt/node_modules/@strapi/database/lib/index.js:34:23)
at Function.Database.init (/opt/node_modules/@strapi/database/lib/index.js:123:14)
at Strapi.bootstrap (/opt/node_modules/@strapi/strapi/lib/Strapi.js:420:30)
at Strapi.load (/opt/node_modules/@strapi/strapi/lib/Strapi.js:491:16)
at async workerProcess (/opt/node_modules/@strapi/strapi/lib/commands/actions/develop/action.js:110:26)
Any ideas what I am doing wrong?