A Dockerized development environment for applications based on OroPlatform.
- Advanced Usage
- Run tests in Docker environment
- Run tests like CI server
- Switch database, php and other services version
- Use Cases
-
Clone repository to your local machine
git clone git@github.com:laboro/dev.git ~/orodev
-
Configure GitHub token for current project. To retrieve new token follow by this link.
docker run -v $(realpath ~/orodev)/environment/.composer/auth/:/usr/local/composer/auth oroinc/composer:1.4 config -g github-oauth.github.com <YOUR_GITHUB_AUTH_TOKEN>
-
Define environment variable with absolute path to the application root directory
export ORO_APP=$(realpath ~/orodev)/application/commerce-crm-ee
-
Define environment variable with application env mode (prod or dev, prod by default)
export SYMFONY_ENV=prod
This variable is required
-
Run docker compose
docker-compose -p oro -f environment/php71_nginx_pgsql_full_ee.yml up
This variable is optional (will be in prod mode if not defined)
-
Wait until composer vendors installation. Proceed once you see next message
oro_composer_1 exited with code 0
-
Then open in your web-browser http://webserver.oro.docker and continue via web installation wizard.
Driver: PostgreSQL
Host: database
Port: empty
Name: oro_db
User: oro_db_user
Password: oro_db_pass
Drop database: None
Transport: SMTP
Host: mail
Port: 1025
Encryption: None
user: empty
password: empty
Service bind address: 0.0.0.0
Service bind port: 8080
WS Backend host: *
WS Backend port: 8080
WS Frontend host: *
WS Frontend port: 8080
All emails what be sent from application will be catched by MailHog.
Web-GUI available by url: http://mail.{project_name}.docker:1080
(for example: http://mail.oro.docker:1080)
UI: http://mq.{project_name}.docker:15672
(for example: http://mq.oro.docker:15672)
User: oro_mq_user
Password: oro_mq_pass
If you want to stop environment for future just press ctrl + c
, in detached mode run:
docker-compose -p oro -f environment/php71_nginx_pgsql_full_ee.yml stop
docker-compose -p oro -f environment/php71_nginx_pgsql_full_ee.yml up
- Destroy docker containers with volumes
docker-compose -p oro -f environment/php71_nginx_pgsql_full_ee.yml down -v
Warning it is destroy all persistent data (database, search, mq, etc..)
- Delete application cache
rm -rf "${ORO_APP}/var/cache/*"
- Delete application config
rm -rf "${ORO_APP}/config/parameters.yml"
- Run new containers
docker-compose -p oro -f environment/php71_nginx_pgsql_full_ee.yml up
Run commands one by one to clean up your environment
docker ps -aq | xargs docker rm -fv
docker volume ls -q | xargs docker volume rm -f
docker network ls -q | xargs docker network rm
docker images -q | xargs docker rmi -f