{"id":19693618,"url":"https://github.com/ezsystems/ezpublish-docker","last_synced_at":"2025-04-29T09:31:52.187Z","repository":{"id":15710486,"uuid":"18448498","full_name":"ezsystems/ezpublish-docker","owner":"ezsystems","description":"[DEPRECATED] eZ Platform with CoreOS host and Debian 8 based containers (a kibao/symfony2-docker fork)","archived":false,"fork":false,"pushed_at":"2017-09-04T10:34:37.000Z","size":25865,"stargazers_count":18,"open_issues_count":0,"forks_count":7,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-05T14:51:13.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cristi-contiu/sendrill","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezsystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-04T18:35:42.000Z","updated_at":"2021-08-05T21:12:50.000Z","dependencies_parsed_at":"2022-09-06T17:40:28.502Z","dependency_job_id":null,"html_url":"https://github.com/ezsystems/ezpublish-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fezpublish-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fezpublish-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fezpublish-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2Fezpublish-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezsystems","download_url":"https://codeload.github.com/ezsystems/ezpublish-docker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251473498,"owners_count":21595058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T19:17:23.095Z","updated_at":"2025-04-29T09:31:51.270Z","avatar_url":"https://github.com/ezsystems.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eZ Platform, eZ Studio \u0026 eZ Publish Platform 5.3+ in Docker\n\n*Project is work in progress!*\n\nAims to provide setup for _eZ Platform_(also implies _eZ Studio_) using Docker containers and Docker Compose, either natively on linux if you have docker and docker-compose installed, or via VM using Vagrant and Virtualbox/AWS.\n_Note: The use of Vagrant will probably be faded out in favour of Docker Machine in the future._\n\n## Project goal\n\nTwo things:\n- Provide an (eventually) official php image for use with eZ Platform, able to configure itself on startup. On top of that:\n - By extended container or otherwise: support for eZ Publish 5.3+ *(fixes will be made on upstream 5.3.x/5.4.x to make this possible)*\n - By extended container or otherwise: support debugging/development mode use cases and other PHP versions\n- Provide a wide range of docker-compose setups for the different ways to setup eZ Platform, using thirdparty official docker images *(apache, nginx, mysql, mariadb, solr, varnish, memcached, redis, ..)*\n\n\nThe docker-compose setups aims to cover specific setups.\nAnd the aim is that the yml files can easily be customized to change version to test for QA/Support/Reproduction needs.\n- (default) Single server using mysql: nginx, mariadb\n- Cluster using mysql *(sharing volume, so on one machine)*: nginx, mysql, memcached, varnish\n- Single server postgres: apache (fastcgi), postgres\n\nWith this everything should be in place for easily evaluating adding postgres cluster support, adding redis support,\nshared files system for scalability testing, and much more..\n\n\n## Installation\n\nThe containers can be created and started using either vagrant or docker-compose. Vagrant will create a virtual machine where the containers are running while docker-compose will create the containers on host ( requires linux....)\n\n### Default system\n\nBy default, the following system will be installed:\n- Vagrant will create a virtual machine using VirtualBox. This VM will run CoreOS\n- Latest eZ Platform will be installed (any distribution available over *composer create-project* should work)\n- eZ Platform will be available on http://33.33.33.53:8080 on the VM\n\n### Optional installation steps\n\n- Copy files/docker-compose.config-EXAMPLE to files/docker-compose.config ( and set the environment variables in files/docker-compose.config according to your needs if you want to change the default setup ).\n- Copy files/auth.yml-EXAMPLE to files/auth.yml.\n  This file has two authentication sections:\n - The setting for updates.ez.no is applicable if you want to install eZ Publish Enterprise/eZ Platform LTS/eZ Studio and not the community version\n - The setting for github.com is applicable when doing installations via composer ( which is default ). It will raise certain API bandwidth limitations on github.\n   In order to create a github oauth token, please follow instructions on this page : https://help.github.com/articles/creating-an-access-token-for-command-line-use To revoke access to this github oauth token you can visit https://github.com/settings/applications\n - Adding a github oauth token will in most cases INCREASE the performance of the installation process and is therefore HIGHLY recommended.\n- Copy files/vagrant.yml-EXAMPLE to files/vagrant.yml. Then adjust settings in .yml file as needed\n- If you have an existing ezplatform installation you want to use, do the following :\n - Place the installation in volumes/ezpublish\n - Make sure EZ_INSTALLTYPE is set to \"basic\"\n - You need to manually import the database from the php-cli container ( see chapter \"Running php-cli and mysql commands\" )\n   This needs to be done after all images and containers has been created ( after you have executed \"vagrant up\" or \"./docker-compose.sh up -d\" )\n   For convenience, you should also place the database dump in volumes/ezpublish so you may easily access it from the php-cli container\n\nNote : If you opt not to copy the configurations files mentioned above ( the *.-EXAMPLE files ), the system will do so for you and use default settings.\n\n\n### AWS specific procedures\n\nIf you want to use an elastic IP you need version 0.5.1 of the vagrant-aws plugin ( currently in development ). The easiest way to do this is to use the provided container.\nYou may also use this container if you simply do not want to install vagrant on your system.\n\nIn order to create the container image, run :\n```docker build --rm=true --force-rm=true -t ezpublishdocker_vagrantaws:latest dockerfiles/internal/vagrant-aws/```\n\nIn order to use this image, use the vagrant wrapper instead of using the vagrant installed directly on your system:\n./vagrant-aws.sh [vagrant options]\n\nExample #1:\n./vagrant-aws.sh up --provider=aws\n\nExample #2:\n./vagrant-aws.sh up provision\n\nAs you can see, the wrapper will pass on any provided parameters to the vagrant process inside the container.\n\n\n### Vagrant specific procedures\n- Ensure you have the following tools installed on our computer:\n - Vagrant 1.6+ (http://vagrantup.com)\n - VirtualBox 4.3.12+ (http://www.virtualbox.org)\n - If using AWS: Install Vagrant AWS plugin. To install run vagrant ```vagrant plugin install vagrant-aws```\n   If using the vagrant container above, this step is not needed\n - Copy files/user-data-EXAMPLE (optionally files/user-data-EXAMPLE-AWS ) to files/user-data and provide a discovery token as instructed in the file\n- If using AWS : \n - In files/vagrant.yml, define \"use_aws=true\"\n - Create a dummy box: ```vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box```\n - You likely want web server to listen on port 80, not port 8080. If so, you need to change \"8080:80\" into \"80:80\" in the nginx section in docker-compose.yml ( unfortunately, this cannot be a setting in files/docker-compose.config )\n- Run `vagrant up`\n\nIf you later want to do changes to your docker/vagrant files, you need to stop and remove the corresponding container ```docker stop [containerid]; docker rm [containerid]```, remove the image ```docker rmi [imageid]``` and then run ```vagrant provision``` instead of ```vagrant up```\n\n#### IMPORTANT difference between provision on virtualbox vs AWS\nWhen using virtualbox as provisioner, ```vagrant provision``` will *not* rsync your local changes over to the VM. Only a ```vagrant up```will do that.\nWhen using AWS as provisioner, ```vagrant provision``` *will* run rsync. This is likely NOT the behaviour you want as this will overwrite db and ezpublish volumes on AWS machine every time you provision.\nTo prevent this from happening when provisioning on AWS, use the setting \"disable_rsync: yes\" in vagrant.yml\n\nIf you do changes in configuration files or docker files you may run this commands in order to sync them the VM:\n```cd ezpublish-docker```\n```rsync -avq --delete --exclude \".git/\" --exclude \"volumes/ezpublish/.git/\" --exclude \".vagrant\" --exclude volumes . core@1.2.3.4:/vagrant```\n\nwhere \"1.2.3.4\" is the IP if the virtual machine\n\nPlease note that running ```vagrant rsync```will also delete any volumes in VM and instead copy over those you have locally\n\n### Specific procedures when running containers on local host, not in VM using Vagrant\n- Ensure you have the following tools installed on your computer:\n - docker version 1.6 or later ( https://docs.docker.com/installation/ubuntulinux/ )\n - Docker-Compose version 1.3.0 or later ( http://docs.docker.com/compose/install/ )\n- Run `./docker-compose.sh up -d`\n\nIf you later just want to recreate specific images or containers, you then first remove those using `docker rm [container]` and `docker rmi [image]`, and then run\n`./docker-compose.sh up -d --no-recreate`\n\n\n### build.sh\n\nbuild.sh will build the \"service\" images you need in order to run eZ Platform. By \"service\" image we mean the nginx and php images. No customized db image is currently needed as the official MariaDB docker image is used. \n\n### docker-compose_ezpinstall.sh\n\ndocker-compose_ezpinstall.sh is a script which will download eZ Platform via composer and install it in volumes/ezpublish. You may specify parameters to composer using EZ_COMPOSERPARAM variable in files/docker-compose.config.\ndocker-compose_ezpinstall.sh will automaticly by run when running ```vagrant up``` and ```vagrant provision```.\n\n### docker-compose.sh\n\ndocker-compose.sh is a wrapper for docker-compose which also do some internal provisioning. Any command line arguments (except \"-c configfile\" ) used when starting the wrapper is passed on to docker-compose.\ndocker-compose.sh also accepts one special argument for specifying a alternative configuration file ( files/docker-compose.config is the default one if \"-c ...\" is not provided ).\nExample : \n```docker-compose.sh --custom-conf files/my_custom_docker-compose.config up -d --no-recreate```\n\n### Access your eZ Platform installation\n\nWhen the containers are created, you should be able to browse to eZ Platform setup wizard by going to http://[VM_IP_ADDR]:8080/ if using vagrant and http://localhost:8080/ if running the containers on localhost \n\n### Setting up eZ Platform using install script\n\nIt is possible to setup a fresh installation using the install script instead of using the setup wizard. ( If using vagrant, this is done automaticly )\n - Run command : ```docker-compose -f docker-compose.yml run -u ez --rm phpfpm1 /bin/bash -c \"php app/console ezplatform:install demo; php app/console cache:clear --env=prod\"```\n\nFYI : The command above assumes you have ```SYMFONY_ENV=prod``` in files/docker-compose.config. If you use a different setting, adjust the ```--env=....``` parameter accordingly.\nYou may also substitute \"demo\" with \"demo_clean\" if you want to install ezdemo without demo data, or \"clean\" if only want the very basics.\n \n\n### Varnish\n\nThese are the steps needed in order to get varnish running\n- Set ```VARNISH_ENABLED=yes\"```in docker-compose.config.\n- Run ```docker-compose.sh up -d``` or ```docker-compose.sh up -d --no-recreate``` as usual\n- Run the eZ Publish Setup Wizard\n- Start the varnishprepare container in order to configure eZ Publish to use a http cache in app/config/ezplatform.yml : ```docker-compose -f docker-compose[_ubuntu].yml start varnishprepare```\n  This varnishprepare container has some requirements:\n  - Please note that this container must be run *after* setup wizard has been created. If you run it before SW, the `ezplatform.yml` is yet not generated and the varnishprepare container will abort\n  - In order to inject the settings correctly in `ezplatform.yml`, your `ezplatform.yml` should not differ too much from the standard ezpublish.yml generated by the setup wizard\n  - Due to the fact mentioned in previous point, this container do not support installations which has been configured using the install script.\n  - The varnishprepare container assumes your siteaccess group is called \"ezdemo_site_clean_group\" or \"ezdemo_site_group:\" ( which is the defaults when installing \"Demo site with(out) demo content\" )\n- If the varnishprepare container is not able to configure ezplatform correctly on your setup, please follow the instructions in the \"Update YML configuration\" chapter on https://doc.ez.no/display/EZP/Using+Varnish\n- If container do not work as expected, you may inspect the log using ```docker logs ezpublishdocker_varnishprepare_1```\n- The ```docker logs ....``` will output the IP of the varnish container which you need in order to configure ezplatform.yml manually\n\n\n#### SSH\n\n##### VM\n\nTo enter virtual machine:\n- ```vagrant ssh```\n\nFrom there you can check running containers:\n- ```docker ps```\n\nAnd inspect the eZ Publish folder which was rsynced into the vm and is used as volume for `ezpublishvol` container:\n- ```ls -al /vagrant/volumes/ezpublish/```\n\n\n##### Running php-cli and mysql commands\n\nTo run php/mysql commands you'll need to start a new container which contains php-cli:\n- ```vagrant ssh```\n- ```docker run --rm -i -t --link ezpublishdocker_db1_1:db --dns 8.8.8.8 --dns 8.8.4.4 --volumes-from ezpublishdocker_ezpublishvol_1 --volumes-from ezpublishdocker_composercachevol_1 ezpublishdocker_phpcli /bin/bash```\n\nIf running the containers on localhost, you have to skip the ```vagrant ssh``` of course\n\nFrom there you can run symfony commands like normal:\n- ```php app/console ezpublish:legacy:assets_install --symlink --relative --env dev``\n\nYou can also access mysql from this container as it has the mysql client installed:\n- ```mysql -uadmin --password=[mysqlpasswd] --protocol=tcp --host=db```\n\nMysql password is defined in files/docker-compose.config\n\n( For other environment variables see ```env```, basically these typically comes from parent images and links )\n\nTo get out, type ```exit``` two times ;)\n\n##### Running vagrant from windows\n\nIt is possible to run this from Windows. However, it is not possible to use synced_folder with type virtualbox (seems to be some incompatibility between virtualbox and docker's provision plugin in Vagrant or between CoreOS and Vagrant ? )\nSo, you need to use rsync on Windows too. In order to do this, you need rsync and ssh.\nEasiest way to accomplish this is to install MinGW ( minimalist GNU for Windows ), http://sourceforge.net/projects/mingw/files/MSYS/Extension/rsync/rsync-3.0.8-1/\nDownload wingw-get-setup.exe and install openssh and rsync. You should then add \"C:\\MinGW\\msys\\1.0\\bin\" to your path and you should be all set to run \"vagrant up\"\n\nIf you have issues getting ssh keys to work with MinGW, this is how to fix that:\n\n    C:\\\u003e cd C:\\MinGW\\msys\\1.0\n    C:\\\u003e mkdir home\\vl\\.ssh\n\nSubstitute 'C:\\MinGW\\msys\\1.0' with your actuall MinGW installation directory.\n\n### Tutorials\n\n#### Installing the system using vagrant\n\nMake a config file ( recommended, but not strictly speaking )\n    ```cp files/docker-compose.config-EXAMPLE files/docker-compose.config```\n\nMake a vagrant config file\n    ```cp files/vagrant.yml-EXAMPLE to files/vagrant.yml```\n\nStart vagrant\n    ```vagrant up```\n\nAccess the eZ Platform installation.\nAccess the installation using the url http://33.33.33.53/\n\n\n\n#### Installing on local host without vagrant ( requires docker and docker-compose installed locally )\n\nMake a config file ( recommended, but not strictly speaking needed )\n    ```cp files/docker-compose.config-EXAMPLE files/docker-compose.config```\n\nCreate the service images ( web and php images )\n    ```./build.sh```\n\nInstall eZ Platform/Studio:\n    ```./docker-compose_ezpinstall.sh```\n\nCreate the containers needed for running eZ Platform/Studio\n    ```./docker-compose.sh up -d --no-recreate```\n\nRun the install script\n    ```docker-compose -f docker-compose.yml run --rm -u ez phpfpm1 /bin/bash -c \"php app/console ezplatform:install demo; php app/console cache:clear --env=prod\"```\n\nStop the containers:\n    ```docker-compose -f docker-compose.yml stop```\n\nRemove the containers:\n    ```docker-compose -f docker-compose.yml rm -v; docker-compose -f docker-compose_ezpinstall.yml rm -v```\n\nRemove the images:\n    ```docker rmi ezsystems/web ezsystems/ezphp ezsystems/ezphp:5.6```\n\nRemove the eZ Platform files:\n    ```sudo rm -rf volumes/ezpublish/* volumes/mysql/*; sudo rm volumes/ezpublish/.travis.yml volumes/ezpublish/.gitignore```\n\n\n#### Installing ezp 5.4 on local host without vagrant ( requires docker and docker-compose installed locally )\n\nMake a config file ( recommended, but not strictly speaking needed )\n    ```cp files/docker-compose.config-EXAMPLE files/docker-compose.config```\n\nMake sure you have the following setting in ```files/docker-compose.config```:\n\n    EZ_COMPOSERPARAM=\"--prefer-dist --repository-url=https://updates.ez.no/ttl ezsystems/ezpublish-community /var/www ~5.4.0\"\n\nCreate the service images ( web and php images )\n    ```./build.sh```\n\nInstall eZ Platform/Studio:\n    ```./docker-compose_ezpinstall.sh -f docker-compose_ezpinstall_php5.yml```\n\nCreate the containers needed for running eZ Platform/Studio using php5 container instead of php7\n    ```./docker-compose.sh -f docker-compose_ezp54.yml -f docker-compose_php5.yml up -d --no-recreate```\n\nStop the containers:\n    ```docker-compose -f docker-compose_ezp54.yml -f docker-compose_php5.yml stop```\n\nRemove the containers:\n    ```docker-compose -f docker-compose_ezp54.yml -f docker-compose_php5.yml rm -v; docker-compose -f docker-compose_ezpinstall.yml -f docker-compose_php5.yml rm -v```\n\nRemove the images:\n    ```docker rmi ezsystems/web ezsystems/ezphp ezsystems/ezphp:5.6```\n\nRemove the eZ Platform files:\n    ```sudo rm -rf volumes/ezpublish/* volumes/mysql/*; sudo rm volumes/ezpublish/.travis.yml volumes/ezpublish/.gitignore```\n\n\n#### Building the distro container\n\nMake a config file\n    ```cp files/distro_containers.config-EXAMPLE files/distro_containers.config```\n    \nCreate the service images ( web, db and php images )\n    ```./build.sh```\n\nCreate the containers\n    ```./create_distro_containers.sh```\n\nStart the containers\n    ```source files/docker-compose.config; docker-compose -f docker-compose_services.yml up -d --no-recreate```\n\nRemove all the containers\n    ```\n    docker-compose -f docker-compose_services.yml stop; docker-compose -f docker-compose_services.yml rm -v\n    ./create_distro_containers.sh --cleanup\n    ```\n\n#### Running behat tests\n\nMake a config file\n    ```cp files/distro_containers.config-EXAMPLE files/distro_containers.config```\n\nConfigure `EZ_COMPOSERPARAM` without `--no-dev` option *(as behat is dev package)*, example:\n    ```EZ_COMPOSERPARAM=\"--prefer-source --no-progress --no-interaction ezsystems/ezplatform /var/www dev-master\"```\n\nMake docker-compose file for behat *(step is temporary until we start to use docker compose extend features)*:\n    ```cat docker-compose.yml docker-compose_behat.yml.template \u003e docker-compose_behat.yml```\n\nCreate the service images ( web and php images )\n    ```./build.sh```\n\nInstall eZ Platform/Studio *(Step uses what you specified in `EZ_COMPOSERPARAM`)*:\n    ```./docker-compose_ezpinstall.sh```\n\nCreate the containers needed for running eZ Platform/Studio\n    ```./docker-compose.sh -f docker-compose_behat.yml up -d --no-recreate```\n\nRun the eZ Platform/Studio install script, example:\n    ```docker-compose -f docker-compose_behat.yml run -u ez --rm phpfpm1 /bin/bash -c \"php app/console ezplatform:install demo; php app/console cache:clear --env=prod\"```\n\nRun behat tests, example:\n    ```./docker-compose.sh -f docker-compose_behat.yml run --rm behatphpcli bin/behat --no-colors --profile demo --suite content```\n\nIf you need to see what is going on in the browser being used by selenium, this is how:\n- Find the name of the selenium container using ```docker ps -a```. ( It is usually called ```ezpublishdocker_selenium_1``` )\n- Find the IP address of the selenium container using ```docker inspect ezpublishdocker_selenium_1```. Look under NetworkSettings--\u003eIPAddress\n- Enter the container using ```docker exec -t -i ezpublishdocker_selenium_1 /bin/bash``` and issue the following commands:\n - ```sudo apt-get update```\n - ```sudo apt-get install x11vnc```\n - ```x11vnc -display :99```\n- If you run the containers on a remote server but want to see the X session on your local display, port-forward the container's port 5900 to localhost :\n - ```ssh remoteserver.example.com -L 5900:172.17.27.159:5900``` ( where you substitute \"172.17.27.159\" with the actuall IP of the selenium container )\n- Start vncviewer on your computer : ```vncviewer localhost:5900```\n\n\n#### Running eZ Platform/Studio with solr\n\nMake a config file ( recommended, but not strictly speaking )\n    ```cp files/docker-compose.config-EXAMPLE files/docker-compose.config```\n\nMake docker-compose file for solr:\n    ```cat docker-compose.yml docker-compose_solr.yml.template \u003e docker-compose_solr.yml```\n\nEnable solr link for phpfpm1 service\n    Edit `docker-compose_solr.yml` and uncomment `#   - solr1:solr` in the `phpfpm1:` section.\n\nCreate the service images ( web and php images )\n    ```./build.sh```\n\nInstall eZ Platform/Studio:\n    ```./docker-compose_ezpinstall.sh```\n\nCreate the containers needed for running eZ Platform/Studio\n    ```./docker-compose.sh -f docker-compose_solr.yml up -d --no-recreate```\n\nRun the install script\n    ```docker-compose -f docker-compose_solr.yml run -u ez --rm phpfpm1 /bin/bash -c \"php app/console ezplatform:install demo; php app/console cache:clear --env=prod\"```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezsystems%2Fezpublish-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezsystems%2Fezpublish-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezsystems%2Fezpublish-docker/lists"}