Skip to content

digitalspacestdio/homebrew-docker-compose-akeneo6

 
 

Repository files navigation

Akeneo PIM v6 Docker Compose Environment

The easy environment for Dummies Supported Systems

  • MacOs (Intel, Apple M1)
  • Linux (AMD64, ARM64)
  • Windows via WSL2 (AMD64)

Pre-requirements

Docker

MacOs
Install Docker for Mac: https://docs.docker.com/desktop/mac/install/

Linux
Install Docker Engine: https://docs.docker.com/engine/install/ubuntu/
Install Docker Compose https://docs.docker.com/compose/install/

Windows
Follow this guide: https://docs.docker.com/desktop/windows/wsl/

Homebrew (MacOs/Linux/Windows)

Install Homebrew by following guide https://docs.brew.sh/Installation

Composer Credentials

You need to export COMPOSE_PROJECT_COMPOSER_AUTH variable s othat Composer can use credentials inside containers

export COMPOSE_PROJECT_COMPOSER_AUTH='{
    "http-basic": {
        "repo.example.com": {
            "username": "xxxxxxxxxxxx",
            "password": "yyyyyyyyyyyy"
        }
    },
    "github-oauth": {
        "github.com": "xxxxxxxxxxxx"
    }
}'

Optionally you can add this row to your ~/.bashrc or ~/.zshrc

Installation

Install the formula via homebrew

brew install digitalspacestdio/docker-compose-akeneo6/docker-compose-akeneo6

Option.1 Creating new project from scratch

  1. Create the new projet directory
mkdir ~/akeneo6
  1. Navigate to the projet directory
cd ~/akeneo6
  1. Create the new project
docker-compose-akeneo6 composer create-project akeneo/pim-community-standard /var/www "6.0.*@stable"
  1. Install the application
docker-compose-akeneo6 make dev
  1. Start the stack in the background mode
docker-compose-akeneo6 up -d

Application will be available by following link: http://localhost:30680/

Option.2 Starting already exists project from git and local sql dump

  1. Clone the project source code
git clone https://github.com/youcompanyname/akeneo6.git ~/akeneo6
  1. navigate to the project dir
cd  ~/akeneo6
  1. Install dependencies
docker-compose-akeneo6 composer install -o --no-interaction
  1. Import database dump (supports *.sql and *.sql.gz files)
docker-compose-akeneo6 database-import /path/to/dump.sql.gz
  1. Start the stack in the background mode
docker-compose-akeneo6 up -d

Application will be available by following link: http://localhost:30680/

Shutdown the project stack

Stop containers

docker-compose-akeneo6 down

Destroy containers and persistent data

docker-compose-akeneo6 down -v

Extra tools

Connecting to the mysql container

docker-compose-akeneo6 mysql

Connecting to the cli container

docker-compose-akeneo6 bash

Generate compose config and run directly without this tool

docker-compose-akeneo6 config > docker-compose.yml
docker compose up

Environment Variables

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 corresponding fpm-alpine image, see https://hub.docker.com/_/php/?tab=tags&page=1&name=fpm-alpine&ordering=name for more versions
  • COMPOSE_PROJECT_NODE_VERSION - (12.22.12|14.19.3|16.16.0) the image will be built from a corresponding alpine image, see https://hub.docker.com/_/node/tags?page=1&name=alpine3.16 for more versions
  • COMPOSE_PROJECT_MYSQL_IMAGE - mysql:8.0-oracle see https://hub.docker.com/_/mysql/?tab=tags for more versions
  • COMPOSE_PROJECT_ELASTICSEARCH_VERSION - 7.16.3 see https://www.docker.elastic.co/r/elasticsearch/elasticsearch-oss for more versions
  • COMPOSE_PROJECT_NAME - by default the working directory name will be used
  • COMPOSE_PROJECT_PORT_PREFIX - 306 by default
  • COMPOSE_PROJECT_PORT_HTTP - $COMPOSE_PROJECT_PORT_PREFIX + 80 by default
  • COMPOSE_PROJECT_PORT_XHGUI - $COMPOSE_PROJECT_PORT_PREFIX + 81 by default
  • COMPOSE_PROJECT_PORT_MYSQL - $COMPOSE_PROJECT_PORT_PREFIX + 06 by default
  • COMPOSE_PROJECT_PORT_ELASTICSEARCH - $COMPOSE_PROJECT_PORT_PREFIX + 92 by default
  • COMPOSE_PROJECT_PORT_MAIL_WEBGUI - $COMPOSE_PROJECT_PORT_PREFIX + 25 by default

Enable xdebug

In first you need to define the environment variable XDEBUG_MODE

export XDEBUG_MODE=debug

or container specific

export XDEBUG_MODE_FPM=debug
export XDEBUG_MODE_CLI=debug
export XDEBUG_MODE_CRON=debug

Visual Studio Code launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "hostname": "0.0.0.0",
            "port": 9003,
            "pathMappings": {
                "/var/www": "${fileWorkspaceFolder}"
            }
        }
    ]
}

About

The Docker Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 54.5%
  • Dockerfile 29.5%
  • PHP 11.9%
  • Ruby 2.7%
  • JavaScript 1.4%