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 fromeval $(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
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
The following composer commands are available:
docker-compose run web composer build
- build frontend and backenddocker-compose run web composer build-frontend
- build frontenddocker-compose run web composer build-backend
- build backenddocker-compose run web composer lint
- run linter on frontend and backend codedocker-compose run web composer lint-frontend
- run linter on frontend codedocker-compose run web composer lint-backend
- run linter on backend codedocker-compose run web composer lint-fix-backend
- run fixer on backend codedocker-compose run web composer test
- run frontend and backend testsdocker-compose run web composer test-frontend
- run frontend testsdocker-compose run web composer test-backend
- run backend tests