Closed rfay closed 2 years ago
Tested on mariadb, mysql, and postgres with the Drupal template, but nothing else. Could you please give this a try @lolautruche, ddev get https://github.com/platformsh/ddev-platformsh/tarball/20220623_arbitrary_db_header
- you'll want to do a ddev pull platform
for full testing as well.
$ ddev restart
Failed to get project(s): /Users/lolautruche/workspace/blackfire/bigfoot-symfony/.ddev/config.yaml exists but cannot be read. It may be invalid due to a syntax error.: unable to load config file /Users/lolautruche/workspace/blackfire/bigfoot-symfony/.ddev/config.platformsh.yaml: invalid configuration in /Users/lolautruche/workspace/blackfire/bigfoot-symfony/.ddev/config.yaml: yaml: line 15: mapping values are not allowed in this context
config.platformsh.yaml
:# #ddev-generated
# Generated configuration based on platform.sh project configuration
php_version: 8.1
database:
type: mariadb
version: 10.4
docroot: public
- exec: set -x -e&&&&symfony-deploy
Thanks @lolautruche - Please attach the .platform.app and .platform as zipball, thanks.
@rfay it's the same than for #13
Ah, this is not a composer build, and the hooks
statement was embedded in composer.
{{ if eq .platformapp.build.flavor "composer" }}
hooks:
post-start:
- composer: install
{{ end }}
Thanks, please try again, rm .ddev/config.platformsh.yaml && ddev get https://github.com/platformsh/ddev-platformsh/tarball/20220623_arbitrary_db_header
The symfony post-start hook will fail I'm sure. Of course I don't have that script, whatever it is, so if you can either tell me how to generate a platform project that has it or share yours with me I can take a look. I imagine it will depend on weird environment variables.
Here's what my generated config.platform.yaml looks like using your stuff:
# #ddev-generated
# Generated configuration based on platform.sh project configuration
php_version: 8.1
database:
type: mariadb
version: 10.4
docroot: public
hooks:
post-start:
- exec: 'set -x -e && symfony-deploy'
Mmm still having the same issue. Maybe a cache problem downloading the tarball?
# #ddev-generated
# Generated configuration based on platform.sh project configuration
php_version: 8.1
database:
type: mariadb
version: 10.4
docroot: public
- exec: set -x -e&&&&symfony-deploy
Silly me. I committed but failed to push. Sorry. I've been trying to use the IDE for git operations after doing everything git on the command line for more than a decade, and it doesn't come easily.
It works 🎉 !
The post-start script does indeed fail on symfony-deploy
, which was expected. This is because the build hook script in my .platform.app.yaml
was not executed in the first place:
hooks:
build: |
set -x -e
curl -s https://get.symfony.com/cloud/configurator | bash
symfony-build
deploy: |
set -x -e
symfony-deploy
Thanks - I'll need access to a project that has the different kinds of hooks, I hadn't been exposed to the others before. Opened https://github.com/platformsh/ddev-platformsh/issues/16 for this, and of course we'll need more env vars to make that work.
Is the one you're testing just a standard template-based site? What kind? If I can make one I will, or maybe you should give me access to yours? Whatever way works.
13
It turns out that services.yml/.platform.app can use any random value for the db section; it has to be derived from the arbitrary value used in .platform.app. See #13