Stacker - The environment for local web development, ready for use.
Stacker - This is a local environment for web development with everything you need. What is its benefit?
$ composer create-project maxlab/stacker
# OR
$ git clone [email protected]:Maxlab/stacker.git
# make ./workspace folder and make a symbolic link to your folder with all your projects
$ mkdir workspace && ln -s /your_path/to_all_your_own_projects ./workspace
# copy .env.dist to .env and change it
$ cp .env.dist .env
$ docker-compose build && docker-compose up -d && docker-compose ps
$ mv ./test ./workspace
- Linux
/etc/resolv.conf
- Mac
System Settings
- Windows
Network Adapter Setting
set your local dns server to 127.0.0.1
, to prevent dnsmasq from running, you need to set up the second DNS server. Such as 8.8.8.8 or something else.
Then open http://test.php.dev/ in your browser
Copy your ssh keys in the folder workspace
$ cp -R ~/.ssh ~/www/docker/stacker/workspace
./workspace/<customer>/<projectname>
(no need to restart, this will work out of the box)db
for mysql and pgsql
for postgresql
(files will be saved in the mysql directory so it will be saved after destroying or recreating the containers) # Example for mysql
parameters:
database_host: mysql
database_port: 3306
database_name: sf
database_user: root
database_password: root
# Example for pgsql
parameters:
database_host: pgsql
database_port: 5433
database_name: sf
database_user: postgres
database_password: postgres
# Example for redis
parameters:
database_host: redis
database_port: 6379
./workspace
and rename your link to workspace - that's all!
Now all your Symfony projects is available from the browser.You can do so:
$ /your_path/to_stacker_folder/bin/stacker console
But, it will be much better:
# for bash
$ echo 'export PATH=/your_path/to_stacker_folder/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
# for ~/.zshrc
$ echo 'export PATH=/your_path/to_stacker_folder/bin:$PATH' >> ~/.zshrc && source ~/.zshrc
# then restart console and run
$ stacker console
$ stacker console
$ cd to_symfony_folder
$ sf [tab*2] # for sf3 completion OR sf2 for sf2 completion
$ stacker console
$ cd to_symfony_folder
$ la5 [tab*2]
$ stacker usage # for list available commands
$ stacker console # for enter to console
$ stacker logs <cont_name> -f # for logs stream container
$ stacker build && stacker down && stacker up && stacker ps # for full rebuild
You can support the project in several ways: