This solution uses docker-sync (for fast two-way synchronization of the application files between the host machine and Docker volume).
- GIT
- PHP
- Composer
- Docker for Mac (Docker-sync suggests (in known issue) to use Docker for Mac in version 17.09.1-ce-mac42 (21090))
- Docker-sync (install via
sudo gem install docker-sync
)
composer create-project shopsys/project-base --stability=alpha --no-install --keep-vcs
cd project-base
Note: The --no-install
option disables installation of the vendors - this will be done later in the Docker container.
Note: The --keep-vcs
option initializes GIT repository in your project folder that is needed for diff commands of the application build and keeps the GIT history of shopsys/project-base
.
There are two domains each for different language in default installation. First one is available via IP adress 127.0.O.1
and second one via 127.0.0.2
.
127.0.0.2
is not alias of 127.0.0.1
on Mac by default. To create this alias in network interface run:
sudo ifconfig lo0 alias 127.0.0.2 up
Create docker-compose.yml
from template docker-compose-mac.yml.dist
.
cp docker/conf/docker-compose-mac.yml.dist docker-compose.yml
On MacOS you need to synchronize folders using docker-sync. Before starting synchronization you need to create a directory for persisting Postgres data so you won't lose it when the container is shut down.
mkdir -p var/postgres-data
docker-sync start
Then start containers
docker-compose up -d
Grant system users inside the container the required permissions
docker exec -it shopsys-framework-php-fpm sh
setfacl -R -m user:82:rwX -m mask:rwX .
setfacl -dR -m user:82:rwX -m mask:rwX .
setfacl -R -m user:100:rX ./web
setfacl -dR -m user:100:rX ./web