{"id":19647270,"url":"https://github.com/ibexa/docker","last_synced_at":"2025-08-31T14:05:43.629Z","repository":{"id":37967907,"uuid":"323845391","full_name":"ibexa/docker","owner":"ibexa","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-19T12:17:18.000Z","size":143,"stargazers_count":0,"open_issues_count":2,"forks_count":5,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-08-19T13:06:46.972Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":null,"language":"Roff","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibexa.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-23T08:26:12.000Z","updated_at":"2025-08-19T10:35:37.000Z","dependencies_parsed_at":"2022-09-03T20:51:04.167Z","dependency_job_id":"dc2ec38f-b03d-427f-baf8-a89e2263d1eb","html_url":"https://github.com/ibexa/docker","commit_stats":{"total_commits":29,"total_committers":6,"mean_commits":4.833333333333333,"dds":0.1724137931034483,"last_synced_commit":"93b2de397760b9f4331efde260bac7243dcc2d2a"},"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"purl":"pkg:github/ibexa/docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibexa%2Fdocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibexa%2Fdocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibexa%2Fdocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibexa%2Fdocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibexa","download_url":"https://codeload.github.com/ibexa/docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibexa%2Fdocker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272988919,"owners_count":25026961,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["hacktoberfest"],"created_at":"2024-11-11T14:43:08.641Z","updated_at":"2025-08-31T14:05:43.602Z","avatar_url":"https://github.com/ibexa.png","language":"Roff","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker blueprints\n\nThis package contains unsupported docker building blocks used for some of automated functional testing infrastructure at [Ibexa](https://ibexa.co).\nFeel free to copy it for own use or look to it for some recommended settings.\n\nBe aware of the following limitations:\n\n\u003e **WARNING, made mainly for automation:** The tools within this directory are meant for use in test automation, QA,\nSupport and demo use cases, and with time as a blueprint for how to best configure your own setup. You are free to use\nand adopt them for your needs, and we more than welcome contributions to improve it.\n\n\u003e **WARNING, low performance on MacOS and Windows:** For reasons mentioned above, these tools are not\noptimized for use as development environment with MacOS or Windows, and are affected by known I/O performance issues caused\nby Docker for MacOS/Windows use of shared folders. This is a known issue and we don't intend to add complexity to work around it.\n\n## Overview\n\nThis setup currently requires Docker Compose 1.14 and Docker 17.06 or higher. Defaults are set in `.env`, and\nfiles to ignore are set in `.dockerignore`. By default, `.env` specifies that the dev setup is used.\n\n**Note:** For this and other reasons all docker-compose commands **must** be executed from root of your project directory.\n\n#### Before you begin: Install Docker \u0026 Docker-Compose\n\nBefore going through the steps below, make sure you have recent versions of [Docker and Docker Compose](https://www.docker.com/)\ninstalled on your machine.\n\n*For Windows you also need to [install bash](https://msdn.microsoft.com/en-us/commandline/wsl/about), or adapt instructions below for Windows command line where needed.*\n\n\n#### Concept: Docker Compose \"Building blocks\" for Ibexa DXP\n\nThe current Docker Compose files are made to be mixed and matched together for QA/Support use cases. Currently available:\n\n- `base-prod.yml` (required, always needs to be first, contains: db, web and app container)\n- `base-dev.yml` (alternative to `base-prod.yml`, same applies here if used)\n- `create-dataset.yml` (optional, to be used together with base-prod.yml in order to set up db and vardir)\n- `demo.yml` (optional, to be used together with base-prod.yml in order to set up db and vardir)\n- `dfs.yml` (optional, adds DFS cluster handler. Note that you need to run the migrate script manually, see below)\n- `blackfire.yml` (optional, adds a Blackfire service and lets you trigger profiling against the setup)\n- `redis.yml` (optional, adds a Redis service and appends config to app)\n- `redis-session.yml` (optional, stores sessions in a separate Redis instance)\n- `varnish.yml` (optional, adds a Varnish service and appends config to app)\n- `solr.yml` (optional, add a Solr service and configure app for it)\n- `db-postgresql.yml` (optional, switches the database engine to PostgreSQL - experimental)\n- `selenium.yml` (optional, always needs to be last, adds a Selenium service and appends config to app)\n- `chromium.yml` (alternative to `selenium.yml`, adds headless Chrome service, same applies here if used. Experimental)\n- `multihost.yml` (optional, adds multihost config to app container network)\n\nYou can use these file with the `-f` argument on docker-compose, like:\n\n```bash\ndocker-compose -f doc/docker/base-prod.yml -f doc/docker/create-dataset.yml -f doc/docker/demo.yml -f doc/docker/redis.yml up -d --force-recreate\n```\n\nHowever below environment variable `COMPOSE_FILE` is used instead since this is also what is used to have a default in\n`.env` file at root of the project.\n\n\n## Project setup\n\n### Demo \"image\" use\n\nUsing this approach, everything runs in containers and volumes. This means that if you for instance upload a image\nusing the Ibexa DXP backend, that image ends up in a volume, and not below `public/var/` in your project directory.\n\nFrom the root of your project's clone of this distribution, [set up composer auth.json](#composer) and execute the following:\n```sh\nexport COMPOSE_FILE=doc/docker/base-prod.yml:doc/docker/create-dataset.yml:doc/docker/demo.yml\n\n# Optional step if you want to use Blackfire with the setup, change \u003cid\u003e and \u003ctoken\u003e with your own values\n#export COMPOSE_FILE=doc/docker/base-prod.yml:doc/docker/create-dataset.yml:doc/docker/demo.yml:doc/docker/blackfire.yml BLACKFIRE_SERVER_ID=\u003cid\u003e BLACKFIRE_SERVER_TOKEN=\u003ctoken\u003e\n\n# First time: Install setup, and generate database dump:\ndocker-compose -f doc/docker/install-dependencies.yml -f doc/docker/install-database.yml up --abort-on-container-exit\n\n# Optionally, build dbdump and vardir images.\n# The dbdump image is created based on doc/docker/entrypoint/mysql/2_dump.sql which is created by above command\n# The vardir image is created based on the content of public/var\n# If you don't build these image explicitly, they will automaticly be builded later when running `docker-compose up`\ndocker-compose build dataset-vardir dataset-dbdump\n\n# Boot up full setup:\ndocker-compose up -d --force-recreate\n```\n\nAfter about 5-10 seconds you should be able to browse the site on `localhost:8080` and the backend on `localhost:8080/admin`.\n\n### Development \"mount\" use\n\nWhen you use this approach, your project directory is bind-mounted into the Nginx and PGP containers.\nIf you change a PHP file in, for instance `src`, that change is applied in automatically.\n\nWarning: *Dev setup works a lot faster on Linux then on Windows/Mac where Docker uses virtual machines with shared folders\nby default under the hood, which leads to much slower IO performance.*\n\nFrom the root of your project's clone of this distribution, [set up composer auth.json](#composer) and execute the following:\n\n```sh\n# Optional: If you use Docker Machine with NFS, you'll need to specify where project is, \u0026 give composer a valid directory.\n#export COMPOSE_DIR=/data/SOURCES/MYPROJECTS/ezplatform/doc/docker COMPOSER_HOME=/tmp\n\n# First time: Install setup, and generate database dump:\ndocker-compose -f doc/docker/install-dependencies.yml -f doc/docker/install-database.yml up --abort-on-container-exit\n\n# Boot up full setup:\ndocker-compose up -d --force-recreate\n```\n\n\nAfter about 5-10 seconds you should be able to browse the site on `localhost:8080` and the backend on `localhost:8080/admin`.\n\n\n_TIP: If you are seeing 500 errors, or in the case of `APP_ENV=dev` database exceptions, then make sure to comment out `database_*` params in `app/config/parameters.yml` to make sure env variables are used correctly._\n\n### Behat and Selenium use\n\n*Docker Compose setup for Behat use is provided and used internally to test Ibexa DXP. It can be combined with most\nsetups, here shown in combination with production setup which is what you typically need to test before pushing your\nimage to Docker Hub/Registry.*\n\nFrom the root of your project's clone of this distribution, [set up composer auth.json](#composer) and execute the following:\n\n```sh\nexport COMPOSE_FILE=doc/docker/base-prod.yml:doc/docker/selenium.yml\n\n# First time: Install setup, and generate database dump:\ndocker-compose -f doc/docker/install-dependencies.yml -f doc/docker/install-database.yml up --abort-on-container-exit\n\n# Boot up full setup:\ndocker-compose up -d --force-recreate\n```\n\nThe last step is to execute Behat scenarios using `app` container which now has access to web and Selenium containers, for example:\n```\ndocker-compose exec --user www-data app sh -c \"php /scripts/wait_for_db.php; php bin/behat -vv --profile=rest --suite=fullJson --tags=~@broken\"\n```\n\n\n*Tip: You can typically re-run the installation command to get back to a clean installation between Behat runs by using:*\n```\ndocker-compose exec --user www-data app php bin/console ibexa:install\n```\n\nNote: if you want to use the Chromium driver, use:\n```\nexport COMPOSE_FILE=doc/docker/base-prod.yml:doc/docker/chromium.yml\n```\nThis driver is not fully supported in our test suite and is in experimental state.\n\n### DFS\n\nIf you want to use the DFS cluster handler, you need to run the migration script manually, after starting the\ncontainers ( run `docker-compose up -d --force-create` first).\n\nThe migration script copies the binary files in public/var to the nfs mount point (`./dfsdata`) and adds the files'\nmetadata to the database. If your are going to run Ibexa DXP in a cluster you must then ensure that `./dfsdata` is a mounted\nnfs share on every node/app container.\n\n```\n# Enter the app container\ndocker-compose exec --user www-data app /bin/bash\n\n# Inside app container\nphp app/console ezplatform:io:migrate-files --from=default,default --to=dfs,nfs --env=prod\n\n```\n\nOnce this is done, you may delete `public/var/*` if you don't intend to run the migration scripts ever again.\n\n### Production use\n\n#### Example: Building app with php image\n\nIn this example we'll build a app image which includes both php (php_fpm) and the Ibexa DXP application and run them\nin a swarm cluster using docker stack.\n\nPrerequisite:\n- A running [swarm cluster](https://docs.docker.com/engine/swarm/swarm-tutorial/) (a one-node cluster is sufficient for running this example)\n- A running NFS server. How to configure a nfs server is distro dependent, but this [ubuntu guide](https://help.ubuntu.com/community/NFSv4Howto) might be of help\n- A running [docker registry](https://docs.docker.com/registry/deploying/#managing-with-compose) (Only required if your swarm cluster has more than one node)\n\nIn this example we assume your swarm manager is named `swarmmanager` and that this hostname resolves on all swarm hosts. We also assume that the nfs server and docker registry are running on `swarmmanager`.\n\nAll the commands below should be executed on your `swarmmanager`\n\n```sh\n# If not already done, install setup, and generate database dump :\ndocker-compose -f doc/docker/install-dependencies.yml -f doc/docker/install-database.yml up --abort-on-container-exit\n\n# Build docker_app and docker_web images ( php and nginx )\ndocker-compose -f doc/docker/base-prod.yml build --no-cache app web\n\n# Build varnish image\ndocker-compose -f doc/docker/base-prod.yml -f doc/docker/varnish.yml build --no-cache varnish\n\n# Create dataset images ( my-ez-app-dataset-dbdump and my-ez-app-dataset-vardir )\n# The dataset images contains a dump of the database and a dump of the var/ files ( located in public/var )\ndocker-compose -f doc/docker/create-dataset.yml build --no-cache\n\n# Tag the images\ndocker tag docker_dataset-dbdump swarmmanager:5000/my-ez-app/dataset-dbdump\ndocker tag docker_dataset-vardir swarmmanager:5000/my-ez-app/dataset-vardir\ndocker tag docker_web swarmmanager:5000/my-ez-app/web\ndocker tag docker_app swarmmanager:5000/my-ez-app/app\ndocker tag docker_varnish swarmmanager:5000/my-ez-app/varnish\n\n# Upload the images to the registry ( only needed if your swarm cluster has more than one node)\ndocker push swarmmanager:5000/my-ez-app/dataset-dbdump\ndocker push swarmmanager:5000/my-ez-app/dataset-vardir\ndocker push swarmmanager:5000/my-ez-app/web\ndocker push swarmmanager:5000/my-ez-app/app\ndocker push swarmmanager:5000/my-ez-app/varnish\n\n# In this example we run the database in a separate stack so that you may easily have multiple Ibexa DXP installations using the same database instance\ndocker stack deploy --compose-file doc/docker/db-stack.yml stack-db\n\n# Now, wait a half a minute to ensure that the database is ready to accept incomming requests before continuing\n\n# Now, load the database dump into the db and the var dir to the nfs server\ndocker-compose -f doc/docker/import-dataset.yml up\n\n# Finally, create the Ibexa DXP stack\ndocker stack deploy --compose-file doc/docker/my-ez-app-stack.yml my-ez-app-stack\n\n# Cleanup\n# If you want to remove the stacks again:\ndocker stack rm my-ez-app-stack\nsleep 15\ndocker stack rm stack-db\nsleep 15\ndocker volume rm my-ez-app-stack_vardir\ndocker volume rm stack-db_mysql\n```\n\n#### Example: Separating app and php\n\nIn this alternative way of running Ibexa DXP, the Ibexa DXP code and PHP executables are separated in two different\nimages. The upside of this is that it gets easier to upgrade PHP (or any other distro applications) independently\nof Ibexa DXP. To do it, replace the PHP container with an updated one without having to rebuild the Ibexa DXP\nimage. The downside of this approach is that all Ibexa DXP code is copied to a volume so that it can be shared with\nother containers. This means bigger disk space footprint and longer loading time of the containers.\nIt is also more complicated to make this approach work with docker stack so only a docker-compose example is provided.\n\n```sh\nexport COMPOSE_FILE=doc/docker/base-prod.yml:doc/docker/create-dataset.yml:doc/docker/distribution.yml\n# If not already done, install setup, and generate database dump :\ndocker-compose -f doc/docker/install-dependencies.yml -f doc/docker/install-database.yml up --abort-on-container-exit\n\n# Build docker_app and docker_web images ( php and nginx )\n# The docker_app image (which contain both php and Ibexa DXP) will be used as base image when creating the image which\n# only contains the Ibexa DXP Platform files.\ndocker-compose -f doc/docker/base-prod.yml build --no-cache app\n\n# Optional, only build the images, do not create containers\ndocker-compose build --no-cache distribution\n\n# Note that if you set the environment variable COMPOSE_PROJECT_NAME to a non-default value, you'll need to use set the\n# build argument DISTRIBUTION_IMAGE when building the distribution image\ndocker-compose build --no-cache --build-arg DISTRIBUTION_IMAGE=customprojectname_app distribution\n\n# Build the \"distribution\" and dataset images, then start the containers\ndocker-compose up -d\n```\n\n## Further info\n\n### \u003ca name=\"composer\"\u003e\u003c/a\u003eConfiguring Composer\n\nFor Composer to run correctly as part of the build process, you need to create a `auth.json` file in your project root with your GitHub readonly token:\n\n```sh\necho \"{\\\"github-oauth\\\":{\\\"github.com\\\":\\\"\u003creadonly-github-token\u003e\\\"}}\" \u003e auth.json\n# If you use Ibexa Content,Experiece or Commerce also include your updates.ibexa.co auth token\necho \"{\\\"github-oauth\\\":{\\\"github.com\\\":\\\"\u003creadonly-github-token\u003e\\\"},\\\"http-basic\\\":{\\\"updates.ibexa.co\\\": {\\\"username\\\":\\\"\u003cinstallation-key\u003e\\\",\\\"password\\\":\\\"\u003ctoken-pasword\u003e\\\",}}}\" \u003e auth.json\n```\n\nFor further information on tokens for updates.ibexa.co, see [the installation guide](https://doc.ibexa.co/en/latest/install/#set-up-authentication-tokens).\n\n### Debugging\n\nFor checking logs from the containers themselves, use `docker-compose logs`. Here on `app` service, but can be omitted to get all:\n```sh\ndocker-compose logs -t app\n```\n\n\nYou can login to any of the services using `docker-compose exec`, here shown against `app` image and using `bash`:\n```sh\ndocker-compose exec app /bin/bash\n```\n\nTo display running services:\n```sh\ndocker-compose ps\n```\n\n### Database dumps\n\nDatabase dump is placed in `doc/docker/entrypoint/mysql/`. This folder is used my mysql/mariadb which executes\neverything inside the folder. This means there should only be data represent one install in the folder at any given time.\n\n\n### Updating service images\n\nTo updated the used service images, you can run:\n```sh\ndocker-compose pull --ignore-pull-failures\n```\n\nThis assumed you either use `docker-compose -f` or have `COMPOSE_FILE` defined in cases where you use something else\nthen defaults in `.env`.\n\nAfter this you can re run the production or dev steps to setup containers again with updated images.\n\n### Cleanup\n\nOnce you are done with your setup, you can stop it, and remove the involved containers.\n```sh\ndocker-compose down -v\n```\n\nAnd if you have defined any environment variables you can unset them using:\n```sh\nunset COMPOSE_FILE COMPOSE_DIR COMPOSER_HOME\n\n# To unset blackfire variables\nunset BLACKFIRE_SERVER_ID BLACKFIRE_SERVER_TOKEN\n```\n\n## COPYRIGHT\n\nCopyright (C) 1999-2025 Ibexa AS (formerly eZ Systems AS). All rights reserved.\n\n## LICENSE\n\nThis source code is available separately under the following licenses:\n\nA - Ibexa Business Use License Agreement (Ibexa BUL),\nversion 2.4 or later versions (as license terms may be updated from time to time)\nIbexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription,\nas described at: https://www.ibexa.co/product\nFor the full Ibexa BUL license text, please see:\n- LICENSE-bul file placed in the root of this source code, or\n- https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)\n\nAND\n\nB - GNU General Public License, version 2\nGrants an copyleft open source license with ABSOLUTELY NO WARRANTY. For the full GPL license text, please see:\n- LICENSE file placed in the root of this source code, or\n- https://www.gnu.org/licenses/old-licenses/gpl-2.0.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibexa%2Fdocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibexa%2Fdocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibexa%2Fdocker/lists"}