x-team / x-map

MIT License
8 stars 3 forks source link

x-map

Setup

In order to run the application locally, you'll need to install:

Start Docker Quickstart Terminal.

Once in the terminal type:

docker-machine-nfs default

This will enable NFS on your Docker default Virtual Machine.

Next, run:

docker-machine ip default

This will display the IP of the virtual machine that will be running the application. You need to add it to your /etc/hosts. Given that `192.168.99.100 was the IP, add the following line there:

192.168.99.100 x-map.app

In order to install dependencies and build the application, run:

docker-compose run web composer build

In case of an error while running Docker Compose (Issue):

ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.

You can either:

  • Run eval $(docker-machine env default)

or

  • Put in .bash_profile the output from eval $(docker-machine env default)

Application is ready to run. Execute the following:

docker-compose up -d

x-map appliction should be available at the http://x-map.app

To stop the application run:

docker-compose down

Development

All changes done to PHP source files will be reflected immediately. All changes to frontend files (HTML, CSS, JS, images) will require the following command to be run:

docker-compose run web composer build-frontend

If you want to update frontend layer and have the live updates in the browser, run npm start in client/ folder - application will be available at localhost:3000

Composer commands

The following composer commands are available: