- git
- make
- docker >= 18.06
- docker-compose >= 1.23
git clone git@github.com:crf-devs/resop.git && cd resop
make
git clone git@github.com:crf-devs/resop.git && cd resop
make pre-configure
make configure
# Caution: you need to uncomment all `:cached` lines in the `the docker-compose.override.yml` file
make all
After the make
command, go to http://resop.vcap.me:7500/,
or https://resop.vcap.me:7583/ for https (self signed certificate).
If you want to run a symfony or a php command: bin/tools <command>
, example: bin/tools bin/console
You don't need to buld all the stack every time. If there is no new vendor, you can simply run:
make start
The project is using a Traefik proxy in order to allow access to all the HTTP services of the project. This service is listening on the 7500 port of the host.
The *.vcap.me
domain names are binded on localhost. In order to use them offline, you only have to add a
127.0.0.1 adminer.vcap.me resop.vcap.me traefik.vcap.me
line on your /etc/hosts
file.
Caution: the traefik proxy will only serve healthy containers. The api container can be unaccessible before the first healthcheck (5s).
The nginx container is available over HTTPS. This url must be used in order to use Facebook, Gmaps, camera...
Please always run the following commands before commiting, or the CI won't be happy ;-)
make fix-cs
make test
Hint: you can run make fix-cs-php
instead of make fix-cs
if you are one of those backend devs who don't touch any css or js file.
make test # Run all tests except coverage
make test-cs # php-cs-fixer
make test-advanced # phpstan
make test-unit # phpunit
make test-unit-coverage # phpunit + phpdbg
As the php-fpm docker container doesn't contain any dev tool as composer, all dev commands must be run on the tools
container. For example:
bin/tools composer
bin/tools bin/console cache:clear
bin/tools # to open a shell on the tools container
In order to profile the php app with Blackfire, you need to have a Blackfire account, then:
- Add your credentials in the
.env
file - Uncomment the
blackfire
service in thedocker-compose.override.yml
file - Uncomment the blackfire env var for the
backend_php
service in thedocker-compose.override.yml
file docker-compose up -d --force-recreate backend_php blackfire
- That's it, you can profile the app!
A node container is available in order to run yarn
commands for webpack encore
:
bin/node-tools yarn encore dev
webpack-build-dev
make webpack-watch-dev