Supported Systems
- MacOs (Intel, Apple Silicon)
- Linux (AMD64, ARM64)
- Windows via WSL2 (AMD64)
MacOs
Install Docker for Mac: https://docs.docker.com/desktop/mac/install/
Linux (Ubuntu and others)
Install Docker Engine: https://docs.docker.com/engine/install/ubuntu/
Install Docker Compose https://docs.docker.com/compose/install/compose-plugin/
Windows
Follow this guide: https://docs.docker.com/desktop/windows/wsl/
Install Homebrew by following guide https://docs.brew.sh/Installation
You need to export following variable or add it to the .bashrc
or .zshrc
file
export COMPOSE_PROJECT_COMPOSER_AUTH='{
"http-basic": {
"repo.example.com": {
"username": "xxxxxxxxxxxx",
"password": "yyyyyyyyyyyy"
}
},
"github-oauth": {
"github.com": "xxxxxxxxxxxx"
},
"gitlab-token": {
"example.org": "xxxxxxxxxxxx"
}
}'
To get the command from local machine use following command:
echo "export COMPOSE_PROJECT_COMPOSER_AUTH='"$(cat $(php -d display_errors=0 $(which composer) config --no-interaction --global home 2>/dev/null)/auth.json)"'"
Install via homebrew by following command
brew install digitalspacestdio/docker-compose-oroplatform/docker-compose-oroplatform
- Clone the application source code
git clone --single-branch --branch 5.1.1 https://github.com/oroinc/orocommerce-application.git ~/orocommerce-application
- Navigate to the directory
cd ~/orocommerce-application
- Build docker images
docker-compose-oroplatform build
- Install composer dependencies
docker-compose-oroplatform composer install -o --no-interaction
- Optionally: Change the database driver in the
config/parameters.yml
(or .env-app) file.
example:
ORO_DB_URL=postgres://application:application@database:5432/application?sslmode=disable&charset=utf8&serverVersion=13.7
- Install the application by following command
docker-compose-oroplatform bin/console --env=prod --timeout=1800 oro:install --language=en --formatting-code=en_US --organization-name='Acme Inc.' --user-name=admin --user-email=admin@example.com --user-firstname=John --user-lastname=Doe --user-password='$ecretPassw0rd' --application-url='http://localhost:30180/' --sample-data=y
- Optional: import database dump (supports
*.sql
and*.sql.gz
files)
docker-compose-oroplatform import-database /path/to/dump.sql.gz
- Warmup cache
docker-compose-oroplatform bin/console cache:warmup
- Start the stack in the background mode
docker-compose-oroplatform up -d
Application should be available by following link: http://localhost:30180/
Stop containers
docker-compose-oroplatform down
Destroy containers and persistent data
docker-compose-oroplatform down -v
Connecting to the cli container
docker-compose-oroplatform bash
Generate compose config and run directly without this tool
docker-compose-oroplatform config > docker-compose.yml
docker compose up
Can be stored in the
.dockenv
,.dockerenv
or.env
file in the project root
COMPOSE_PROJECT_MODE
- (mutagen
|default
)COMPOSE_PROJECT_COMPOSER_VERSION
- (1|2
)COMPOSE_PROJECT_PHP_VERSION
- (7.4
|8.0
|8.1
|8.2
), the image will be built from a correspondingfpm-alpine
image, see https://hub.docker.com/_/php/?tab=tags&page=1&name=fpm-alpine&ordering=name for more versionsCOMPOSE_PROJECT_NODE_VERSION
- (12
|14
|16
) the image will be built from a correspondingalpine
image, see https://hub.docker.com/_/node/tags?page=1&name=alpine3.16 for more versionsCOMPOSE_PROJECT_MYSQL_IMAGE
-mysql:8.0-oracle
see https://hub.docker.com/_/mysql/?tab=tags for more versionsCOMPOSE_PROJECT_PGSQL_VERSION
-13.8
see https://hub.docker.com/_/postgres/?tab=tags for more versionsCOMPOSE_PROJECT_ELASTICSEARCH_VERSION
-7.10.2
see https://www.docker.elastic.co/r/elasticsearch/elasticsearch-oss for more versionsCOMPOSE_PROJECT_NAME
- by default the working directory name will be usedCOMPOSE_PROJECT_PORT_PREFIX
-302
by default
COMPOSE_PROJECT_DATABASE_USER="custom"
COMPOSE_PROJECT_DATABASE_PASSWORD="custom"
COMPOSE_PROJECT_DATABASE_NAME="custom"