Skip to content

Commit 3e41dd4

Browse files
Update Docker images and Strapi v5 compatibility (#142)
* Update Docker images and Strapi v5 compatibility - Bump Node.js from 18 to 22 (current LTS) in dev and prod Dockerfiles - Use postgres:alpine instead of hardcoded version in docker-compose - Switch mysql client to mysql2 for Strapi v5 compatibility - Add missing env vars (APP_KEYS, API_TOKEN_SALT, TRANSFER_TOKEN_SALT) to docker-compose - Remove deprecated docker-compose version field and mysql auth plugin flag - Update README to reflect Strapi v5 targeting - Fix ESLint codeAction setting to use explicit string value * Remove .vscode from version control
1 parent 84dbff5 commit 3e41dd4

File tree

9 files changed

+7119
-11953
lines changed

9 files changed

+7119
-11953
lines changed

.vscode/settings.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ _Note_ that **RESET** will delete the `config/env` folder with all of it's conte
102102

103103
## 🐳 Docker-compose support
104104

105-
- Postgres 14.5
105+
- Postgres 16
106106
- MySQL 8
107-
- MariaDB 10
107+
- MariaDB (latest)
108+
109+
> **Note:** This version targets **Strapi v5**. For Strapi v4 support, use an earlier release.
108110
109111
## 🎗 Contributing
110112

core/database.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const generateDatabase = async () => {
1212
config.projectType === `ts` ? `export default` : `module.exports = `
1313
} ({ env }) => ({
1414
connection: {
15-
client: '${config.dbtype === `postgresql` ? `postgres` : `mysql`}',
15+
client: '${config.dbtype === `postgresql` ? `postgres` : `mysql2`}',
1616
connection: {
1717
host: env('DATABASE_HOST', '${config.dbhost}'),
1818
port: env.int('DATABASE_PORT', ${config.dbport}),

core/dependencies.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const installDependecies = async () => {
2020
);
2121
await execa(config.packageManager, [
2222
`${config.packageManager === `yarn` ? `add` : `install`}`,
23-
`${config.dbtype.toLowerCase() === `postgresql` ? `pg` : `mysql`}`
23+
`${config.dbtype.toLowerCase() === `postgresql` ? `pg` : `mysql2`}`
2424
]);
2525
spinner.stopAndPersist({
2626
symbol: `📦`,
@@ -43,7 +43,7 @@ const checkForOldDependecies = async command => {
4343

4444
await execa(`${config.packageManager}`, [
4545
`${command}`,
46-
`${config.dbtype.toLowerCase() === `postgresql` ? `mysql` : `pg`}`
46+
...(config.dbtype.toLowerCase() === `postgresql` ? [`mysql`, `mysql2`] : [`pg`, `mysql`])
4747
]);
4848

4949
spinner.stopAndPersist({

core/env/appendEnv.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const appendEnv = async () => {
3535
}`
3636
);
3737
writeLine(
38-
`DATABASE_CLIENT=${config.dbtype === `postgresql` ? `postgres` : `mysql`}`
38+
`DATABASE_CLIENT=${config.dbtype === `postgresql` ? `postgres` : `mysql2`}`
3939
);
4040
writeLine(`# @strapi-community/dockerize end variables \n`);
4141
spinner.stopAndPersist({
@@ -64,7 +64,7 @@ const envUpdate = async env => {
6464
`${env.toLowerCase()}`,
6565
`development`,
6666
`DATABASE_CLIENT=${
67-
config.dbtype.toLowerCase() === `postgresql` ? `postgres` : `mysql`
67+
config.dbtype.toLowerCase() === `postgresql` ? `postgres` : `mysql2`
6868
}`,
6969
`DATABASE_HOST=${config.dbhost}`,
7070
`DATABASE_NAME=${config.dbname}`,

0 commit comments

Comments
 (0)