Skip to content

JihadMotii-REISys/hat-2015

Repository files navigation

Install Environment:

####Requirements You need to have vagrant installed https://www.vagrantup.com/downloads.html, then install these following tools:

$ vagrant plugin install vagrant-vbguest

Install project locally

Run command lines in order to set up the project in your machine :

$ git clone -b develop https://github.com/JihadMotii-REISys/hat-2015.git
$ cd hat-2015/conf/vagrant
$ vagrant up
$ vagrant provision --provision-with shell   #sync your local environment with updated dev dependencies
$ vagrant ssh
$ cd /var/www/hat-2015

After the VM is up and running, these are the following command to use for vagrant to start, shutdown, delete your current VM:

$ vagrant up        # Install/Run the VM
$ vagrant halt      # shutdown the VM
$ vagrant destroy   # remove the VM
$ vagrant ssh       # access to your VM (SSH)

######Note: the IP address allocated to this new VM Box is 192.168.56.105 and if you have used this IP Address, you can change it in conf/vagrant/puphpet/config.yaml

#####Run the application without docker

Inside your vagrant VM, run the following command

$ cd /var/www/hat-2015/src/frontend
$ grunt serve

Browse URL: http://192.168.56.105:9000/

Using Docker in Dev environment:

In order to use docker and build/run images/container in dev, you must change one file as mentioned: http://docs.docker.com/engine/articles/systemd/#custom-docker-daemon-options

$ sudo vim /lib/systemd/system/docker.service

- Replace this line:

ExecStart=/usr/bin/docker daemon -H fd://

- By:

EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS \
          $DOCKER_STORAGE_OPTIONS \
          $DOCKER_NETWORK_OPTIONS \
          $BLOCK_REGISTRY \
          $INSECURE_REGISTRY

- Save file and exit

$ sudo systemctl daemon-reload
$ sudo service docker restart

#####Run the application with docker

Inside your vagrant VM, run the following commands

$ sudo su
$ cd /var/www/hat-2015
$ docker-compose -f docker-compose.local.yml up -d

Browse URL: http://192.168.56.105/

To stop and remove containers, run the following commands:

$ sudo su
$ cd /var/www/hat-2015
$ docker-compose -f docker-compose.local.yml stop
$ docker-compose -f docker-compose.local.yml rm -f

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published