Help understanding migrating dockerized app and database #4596
Replies: 1 comment
-
|
This is a common issue when migrating Cachet with MySQL! The setup wizard appearing usually means the app can't detect that it's already been configured. Here's what to check: 1. Environment Variables Make sure your new container has the correct DB_DRIVER=mysql
DB_HOST=your_new_mysql_host
DB_DATABASE=cachet
DB_USERNAME=cachet_user
DB_PASSWORD=your_password
DB_PORT=33062. APP_KEY Must Match The # Get from your old .env file
APP_KEY=base64:YourExistingKeyHere3. Check Database Connection Verify the app can actually connect to the migrated database: docker exec -it your_cachet_container php artisan tinker
>>> DB::connection()->getPdo();4. Clear Cache After Migration docker exec -it your_cachet_container php artisan config:clear
docker exec -it your_cachet_container php artisan cache:clear5. Verify Tables Were Migrated Connect to your new MySQL and check if all tables exist: USE cachet;
SHOW TABLES;
SELECT * FROM settings LIMIT 5;If Quick Diagnostic: Can you check what's in your Side note: For verifying SQL queries during migrations like this, AI2sql can help generate the right SELECT/diagnostic queries if you're not sure about the syntax. What does your database connection look like in the new container? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We have a Cachet app running as a containerized solution with a MySQL database as a backend store. We have migrated the database server and created a new container environment, however, when starting the new environment it asks to go through the setup steps again, despite having the full database from the existing app.
We must have missed something during the migration and can't seem to work out what it is, so any guidance would be great.
Here are the steps we went through:
Beta Was this translation helpful? Give feedback.
All reactions