docs: explain how to use SF Docker with an existing project (#156)
This commit is contained in:
parent
cd0c784387
commit
74d44b8cc0
@ -26,10 +26,11 @@ A [Docker](https://www.docker.com/)-based installer and runtime for the [Symfony
|
|||||||
## Docs
|
## Docs
|
||||||
|
|
||||||
1. [Build options](docs/build.md)
|
1. [Build options](docs/build.md)
|
||||||
2. [Support for extra services](docs/extra-services.md)
|
2. [Using Symfony Docker with an existing project](docs/existing-project.md)
|
||||||
3. [Deploying in production](docs/production.md)
|
3. [Support for extra services](docs/extra-services.md)
|
||||||
4. [Installing Xdebug](docs/xdebug.md)
|
4. [Deploying in production](docs/production.md)
|
||||||
5. [Troubleshooting](docs/troubleshooting.md)
|
5. [Installing Xdebug](docs/xdebug.md)
|
||||||
|
6. [Troubleshooting](docs/troubleshooting.md)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
33
docs/existing-project.md
Normal file
33
docs/existing-project.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# Installing on an Existing Project
|
||||||
|
|
||||||
|
It's also to use Symfony Docker with existing projects!
|
||||||
|
|
||||||
|
First, [download this skeleton](https://github.com/dunglas/symfony-docker). If you clone the Git repository, be sure to remove the `.git` repository to prevent conflicts with the `.git` directory already in your existing project.
|
||||||
|
|
||||||
|
Then, copy the Docker-related files from the skeleton to your existing project:
|
||||||
|
|
||||||
|
cp -Rp symfony-docker/. my-existing-project/
|
||||||
|
|
||||||
|
Enable the Docker support of Symfony Flex:
|
||||||
|
|
||||||
|
composer config --json extra.symfony.docker 'true'
|
||||||
|
|
||||||
|
Re-execute the recipes to update the Docker-relatd files according to the packags you use
|
||||||
|
|
||||||
|
rm symfony.lock
|
||||||
|
composer symfony:sync-recipes --force --verbose
|
||||||
|
|
||||||
|
Double-check the changes, revert the changes that you don't want to keep:
|
||||||
|
|
||||||
|
git diff
|
||||||
|
...
|
||||||
|
|
||||||
|
Build the Docker images:
|
||||||
|
|
||||||
|
docker-compose build --no-cache --pull
|
||||||
|
|
||||||
|
Start the projects!
|
||||||
|
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
Browse `https://localhost`, your Docker configuration is ready!
|
Loading…
x
Reference in New Issue
Block a user