Code Monkey home page Code Monkey logo

arena's Introduction

Paladin

This project is Work in Progress

How to init development environment

  1. Create devstack folder (ie devstack-arena) and run git clone [email protected]:ironexdev/arena.git in it

  2. Init submodules

  • bin/init
  • Run from the devstack folder
  1. 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
  1. Generate Secrets
  • bin/docker/compose/secrets
  • This command will complain "No such file or directory", but files with secrets should be created anyway.
  1. Start Docker
  • bin/docker/compose/up
  1. Install dependencies
  • bin/docker/paladin/composer install

Development notes

  • 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.

Command Reference

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

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

Production deployment notes

  • Generate MongoDB Doctrine proxy and hydrator classes
    • Remove var/doctrine/hydrator and /var/doctrine/proxy
    • Run odm:generate:hydrators and odm:generate:proxies

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.