[Example] [WIP] Add Symfony Docker with FrankenPHP#115
Draft
alexander-schranz wants to merge 2 commits intomasterfrom
Draft
[Example] [WIP] Add Symfony Docker with FrankenPHP#115alexander-schranz wants to merge 2 commits intomasterfrom
alexander-schranz wants to merge 2 commits intomasterfrom
Conversation
e7b91df to
6f7677f
Compare
Comment on lines
+36
to
+43
| # additional sulu extensions | ||
| RUN set -eux; \ | ||
| install-php-extensions \ | ||
| gd \ | ||
| curl \ | ||
| dom \ | ||
| bz2 \ | ||
| ; |
Member
Author
There was a problem hiding this comment.
This we added additional atleast gd is required to run Sulu. Alternative is imagick or ffi (when using vips adapter)
|
|
||
| ###> recipes ### | ||
| ###> doctrine/doctrine-bundle ### | ||
| RUN install-php-extensions pdo_mysql |
Member
Author
There was a problem hiding this comment.
This is required by default postgres is here but demo comes with MySQL
| MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} | ||
| MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} | ||
| # Run "composer require symfony/orm-pack" to install and configure Doctrine ORM | ||
| DATABASE_URL: mysql://${MYSQL_USER:-root}:${MYSQL_PASSWORD:-ChangeMe}@database:3306/${MYSQL_DATABASE:-su_demo}?serverVersion=${MYSQL_VERSION:-8}&charset=${MYSQL_CHARSET:-utf8mb4} |
Member
Author
There was a problem hiding this comment.
This is hardcoded to postgres in symfony docker we changed this to mysql
| @@ -0,0 +1,4 @@ | |||
| worker { | |||
| file ./public/index.php | |||
| # env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime | |||
Member
Author
There was a problem hiding this comment.
This is a quick start without worker mode
cef7ed1 to
728dcfc
Compare
728dcfc to
59363ee
Compare
| MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} | ||
| # Run "composer require symfony/orm-pack" to install and configure Doctrine ORM | ||
| DATABASE_URL: mysql://${MYSQL_USER:-root}:${MYSQL_PASSWORD:-ChangeMe}@database:3306/${MYSQL_DATABASE:-su_demo}?serverVersion=${MYSQL_VERSION:-8}&charset=${MYSQL_CHARSET:-utf8mb4} | ||
| ELASTICSEARCH_HOST: elasticsearch:9200 |
Member
Author
There was a problem hiding this comment.
the demo uses elasticsearch so we need point to elasticsearch container instead go over the IP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
This is WIP we will remove this warning when the example works as expected.
What's in this PR?
Example for Using Dunglas Symfony Docker: https://github.com/dunglas/symfony-docker, see also Sulu Docs PR: sulu/sulu-docs#829
Steps
Install https://github.com/dunglas/symfony-docker
Add additional PHP Extensions:
gd,pdo_mysqlUpdate in
compose.yamltheDATABASE_URL:DATABASE_URL: mysql://${MYSQL_USER:-root}:${MYSQL_PASSWORD:-ChangeMe}@database:3306/${MYSQL_DATABASE:-su_demo}?serverVersion=${MYSQL_VERSION:-8}&charset=${MYSQL_CHARSET:-utf8mb4}ELASTICSEARCH_HOSH: elasticsearch:9200Disable workermode in
worker.Caddyfilecomment APP_RUNTIME out:# env APP_RUNTIME Runtime\FrankenPhpSymfony\RuntimeIncrease
memory_limitif requiredfrankenphp/conf.d:10-app.ini,20-app.dev.ini,20-app.prod.ini:memory_limit=512MConfigure Volumes for
var/uploadsandpublic/uploads:Build the docker:
Start without TLS and other Ports (Mac don't allow bind :80 or :443):
Visit Server:
Go into the php container:
docker compose exec -ti php /bin/bash bin/console sulu:build dev