This project is Work in Progress
-
Create devstack folder (ie devstack-arena) and run
git clone [email protected]:ironexdev/arena.git
in it -
Init submodules
bin/init
- Run from the devstack folder
- Add following to etc/hosts
127.0.0.1 arena.local
127.0.0.1 mongo.arena.local
127.0.0.1 redis.arena.local
- Generate Secrets
bin/docker/compose/secrets
- This command will complain "No such file or directory", but files with secrets should be created anyway.
- Start Docker
bin/docker/compose/up
- Install dependencies
bin/docker/paladin/composer install
- App uses Custom (Base) and GraphQL API, MongoDB and Redis.
- Server logs can be found in docker/logs.
- App is protected against XSRF - every request (except GET) has to contain X-XSRF-Token header with previously obtained value from calling /xsrf endpoint. This value is stored in a Session.
- Used Docker services
- paladin
- http-proxy
- mongo
- mongo-express
- redis
- redis-admin
- It is recommended to use pretty_print function for data dumping in development.
- Response generated by this function also contains required CORS headers for XHR debugging.
bin/init
- Pull submodules and add bin/docker symlink to docker submodule in order to make bin/docker commands work.
bin/submodule-update
- Pull submodules
bin/docker/paladin/composer <command>
- Run composer in paladin container
bin/docker/paladin/console
- Run Symfony Console command in paladin container
bin/docker/paladin/run <command>
- Run command on API server
bin/docker/paladin/xdebug
- Set PHP Xdebug mode (https://xdebug.org/docs/all_settings#mode) in paladin container
bin/docker/compose/build <service>
- Build or rebuild services
bin/docker/compose/cleanup
- Stop Docker, remove containers and images (optionally add "-v" flag and remove volumes)
bin/docker/compose/down <service>
- Stop one or more running services
bin/docker/compose/restart <service>
- Restart one or more services
bin/docker/compose/secrets
- Generate Docker secrets
bin/docker/compose/up
- Build images if needed and create and start services
bin/docker/clear-logs
- Clear paladin and http-proxy logs
- Generate MongoDB Doctrine proxy and hydrator classes
- Remove var/doctrine/hydrator and /var/doctrine/proxy
- Run odm:generate:hydrators and odm:generate:proxies