Strapi + MySQL

I’m trying to deploy a strapi application with a MySQL database, but the deployment keep failing with this error:
error The client mysql is not installed.
error You can install it with $ npm install mysql --save.

I tried to install both mysql and mysql2 packages but I still get the error.

I can’t understand what I’m doing wrong.

The qovery.yml file:
name: strapi
project: mysecretproject
cpu: 800m
ram: 512mb
start_timeout: 480s
publicly_accessible: true
- name: data
type: ssd
size: 5GB
mount_point: /srv/app

  • type: mysql
    version: 8
    name: my-sql
  • name: main
    • branch: main
      domain: mysecretdomain
    • application_name: strapi
      • /*

The dockerfile:

FROM strapi/strapi:3.6.1 WORKDIR /app COPY ./strapi-app . COPY .env .env RUN yarn RUN yarn build EXPOSE 1337/tcp CMD ["strapi", "start"]

do you use strapi qovery template or you own strapi project ?

Yes I started with the qovery template.

Did you follow all the steps of the read me ? As I can see, the exposed port doesn’t look like the way I set it in read me.

I get this docker error with EXPOSE 1337 when I run qovery run localy
panic: Error response from daemon: invalid port specification: "1337\r".

From the doc here Dockerfile reference | Docker Documentation it seems that adding \tcp helps.

Though I was already having the mysql error before I changed the port option.

Do you think it can be related with this error?

The error you get is fixed. Did you update qovery cli recently ? If no, it should solve this.

The expose error is not linked the mysql error. If you follow all the steps of the read me it works perfectly.

I’m using the latest version of Qovery cli :thinking:

I just tried to create a new project using the Strapi template, I followed all the steps in the read me and I got an error (a different one).

Anyway, I finally switched to Heroku and managed to deploy my app.

I am sorry about that, we are working on the next major release that will drastically improve the developer experience. I hope to see you there :slight_smile: