-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Docker support (Docker Compose and Dockerfile) #128
Conversation
With the proposal #173, this PR would become useless, but you could add this feature to Flex by creating a Composer plugin requiring Flex in her dependencies. |
Well, creating a plugin as described in #173 would not help much AFAIU, as it would also require extending the flex server to support more fields in the recipes (your proposal does not only involve changing Flex, but also the recipes) |
It is not necessary to add new server-side fields, if the plugin is able to retrieve information elsewhere, for example: in the composer extra section, or in local file. |
For this PR for instance, it must retrieve fields from the recipe, so from the server (because the server parses and modifies the recipe). |
But regarding this PR, it can be made more generic as |
@fabpot has done the required changes on the Flex server side. I need to test if it works now. I'll do it as soon as possible. |
You use json array to describe services for version: '3.4'
services:
mongo: # first recipe, 4 spaces
image: mongo:3.6
mysql: # second recipe, 2 spaces
image: mysql:5.7 Also, what if a service name (or a volume name) for two different recipes will be equal? |
I can skip |
Would not it be relevant to disable docker support for people who do not use it so that there is no loss of performance in case they already have a I see this with an options in the |
@covex-nn we have add some new features. Note : a rebase is necessary for fix |
4d06b6e
to
a5ce3e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small correction and it will be perfect 😃
It is to better position the services
This one is ready to be merged. |
If anyone wants to try, just following these instruction Clone a docker skeleton :
Run the docker :
Switch branch :Define the fork repo on repositories section like this :
Define the branch Test a recipe :
Recipe available :Mercure : symfony/recipes#583 |
Would love to review this before it gets merged. Hope we're not in a hurry, after 2 years. |
Hi there, can we merge this one? |
7a4d907
to
d889abf
Compare
@dunglas Can you cleanup the commit history? That's the last thing to do before merging! |
fd7593c
to
37b0e3f
Compare
@fabpot last comments fixed, and history cleaned.
Makes sense, changed to use a regex then.
Flex uses the same markers everywhere. I'm not sure if it's a good idea to change just for Docker. |
Indeed it's not important, as long as it's appropriate for the target file's syntax. 😄 |
Thank you @dunglas. |
This PR was merged into the 1.3-dev branch. Discussion ---------- Docker support (Docker Compose and Dockerfile) /!\ This piece of software is experimental and may break your app. Don't use it without a proper versioning strategy. This is a part of my global plan to add a first-class Docker support in Symfony. It requires dunglas/symfony-docker#5. This PR allows recipes to updates `docker-compose.yaml` (to add services and volumes for instance) and the `Dockerfile` (to add PHP extensions for instance). I'll blog about this when I'll be back from vacation. Commits ------- 78c2bec Docker support (Docker Compose and Dockerfile)
question here regarding Docker Integration: symfony/symfony#38259 |
/!\ This piece of software is experimental and may break your app. Don't use it without a proper versioning strategy.
This is a part of my global plan to add a first-class Docker support in Symfony. It requires dunglas/symfony-docker#5.
This PR allows recipes to updates
docker-compose.yaml
(to add services and volumes for instance) and theDockerfile
(to add PHP extensions for instance).I'll blog about this when I'll be back from vacation.