Putting statmatic:install in composer.json scripts prevents docker setup #12034
Unanswered
Snuffsis
asked this question in
Troubleshooting
Replies: 2 comments
-
Cant you create the database in your dockerfile before running composer? |
Beta Was this translation helpful? Give feedback.
0 replies
-
That would only work for sqlite. So I am assuming you mean that in the docker file, I use sqlite. And then during development I change to another database? That might work. But it still seems to be just another workaround. And in that case I prefer my solution. But I do think it would be nicer if it was possible to skip the database connection during the installation of statamatic. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a question.
I have already manage to get this working (by removing the "post-autoload-dump" command "@php artisan statamic:install --ansi".
But with this enabled, when the Dockerfile builds the image, it runs composer install as well as composer dump-autoload.
However, this causes the build to exit as the statamatic install script tries to connect to the database during installation. And since there is no database connection setup yet, or even a database, it can't connect.
Is there anyway to install statamatic without it trying to reach the database during installation?
Beta Was this translation helpful? Give feedback.
All reactions