Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible de démarrer la stack docker-compose #635

Open
arnaudluti opened this issue Feb 25, 2024 · 4 comments
Open

Impossible de démarrer la stack docker-compose #635

arnaudluti opened this issue Feb 25, 2024 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@arnaudluti
Copy link

arnaudluti commented Feb 25, 2024

Bonjour,

Merci pour le travail,

J'ai suivi les instructions du docker-compose.md, créé les certificats et le fichier db.sqlite avec les bonnes permissions.
J'ai édité le fichier .env et le nginx.conf pour mettre le bon hostname.
Au démarrage de la stack, j'ai une erreur Laravel de contact de la base données "mysql":

mercator       |    Illuminate\Database\QueryException
mercator       |
mercator       |   could not find driver (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'forge' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)
mercator       |
mercator       |   at vendor/laravel/framework/src/Illuminate/Database/Connection.php:829
mercator       |     825▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e

Le conteneur mercator démarre mais erreur Laravel de connexion DB juste après le login.
Pourquoi est-ce que l'appli essaie d'utiliser mysql ?

dans le fichier .env la partie DB est restée commentée...

## APP_NAME=Mercator                           
APP_ENV=production                             
## APP_KEY=                                    
## APP_DEBUG=false                             
                                               
##########################################     
# CONFIG set to your own domain name           
APP_URL=https://mercator.[REDACTED]
##########################################     
                                               
## ASSET_URL=https://mercator.mycompany.com    
## LOG_CHANNEL=stack                           
##                                             
## DB_CONNECTION=mysql                         
[...]

Ai-je loupé une instruction?
Merci d'avance pour votre aide

@dbarzin
Copy link
Owner

dbarzin commented Feb 26, 2024

Je suppose que le fichier .env que tu as utilisé fait référence à mySQL alors que le docker est prévu pour utiliser SQLite et ne contient pas les drivers mySQL ni le serveur de base de données. Tu dois utiliser le fichier .env d'origine.

@dbarzin dbarzin self-assigned this Feb 26, 2024
@dbarzin dbarzin added the question Further information is requested label Feb 26, 2024
@arnaudluti
Copy link
Author

arnaudluti commented Feb 26, 2024 via email

@dbarzin
Copy link
Owner

dbarzin commented Feb 26, 2024

Quand il n'y a pas de variable "host" configurée pour la connexion DB, Laravel suppose que c'est du SQLite.

@dbarzin
Copy link
Owner

dbarzin commented Feb 26, 2024

Vu dans le code de Laravel

if (! isset($connection['host']) && $connection['driver'] !== 'sqlite') 

Le problème doit venir de là. Comme la variable "host" est configurée.
Il faut sans doutes ajouter "driver=sqlite" ou DB_CONNECTION=sqlite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants