Getting started
-
Clone this project. Make sure you have
docker
anddocker-compose
installed on your host machine. -
Create an empty
.env
file in the root directory of the project. -
Then, run:
docker-compose pull
-
When the Docker images have been pulled, you should first install project dependencies using Composer:
./bin/composer.sh install
-
Follow the general advice from the php-workshop-tools README about setting the correct environment variables and configuring PhpStorm. Don't skip this step!
-
To integrate with Stripe and Pusher, create accounts for these services. Copy the contents of
.env.dist
to the.env
you just created and paste your API keys in there. For Pusher, you should first create an "app". -
Then you can finally run:
docker-compose up -d
Useful UIs
- The main website: localhost:8080.
- RabbitMQ Management UI: localhost:15672. You can log in with username "user" and password "password".
- Redis browser: localhost:8079
Tips
- Use
docker-compose logs
to find out what's going on in the containers. Add-f
to follow the logs. - Use
docker-compose restart [container name]
to restart a container (e.g. theorders_and_registrations
container). This is particularly relevant when you want to test changes you made to the code of a RabbitMQ consumer. - Run
./bin/composer.sh require ...
to install additional packages. - Run
./bin/recreate.sh [container_name]
to recreate a container (if you provide no arguments, all containers will be recreated). - Run
./bin/restart.sh [container_name]
to simply restart a container (if you provide no arguments, all containers will be restarted). - Run
./bin/delete-data.sh
to delete all existing data (in/var/db
and/var/redis
).