Symfony2 Backoffice dependencies for Improve Your City.
6.0K
Run sudo visudo
Add at the end of document: radmas ALL=(ALL:ALL) NOPASSWD:ALL
Run sudo apt-get install git curl vim guake terminator
zsh and oh-my-zshsudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Install zsh plugins (optional):
plugins=()plugins=(git wd ruby)For RVM:
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source $HOME/.zshrc
Then, configure your shell as a login shell and install RVM:
rvm install 2.3
rvm use ruby-2.3 --default
gem install bundle
For NVM:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
...And add this lines to .zshrc:
echo "export NVM_DIR=\"$HOME/.nvm\"" >> $HOME/.zshrc
echo "[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\"" >> $HOME/.zshrc
source $HOME/.zshrc
Install node 0.12.17 with nvm install 0.12.17
Install npm with sudo apt install npm
Install grunt-cli with sudo npm install -g grunt-cli
sudo apt-get update
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main'
sudo apt-get update
sudo apt-get install -y docker-engine
sudo usermod -aG docker $(whoami)
Restart your system
sudo suexitEXAMPLE:
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Generate your SSH keys: Open a terminal and run ssh-keygen -t rsa -b 4096 -C "[email protected]"
Example:
nacho@nacho-mint ~ $ ssh-keygen -t rsa -b 4096 -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/nacho/.ssh/id_rsa):
Created directory '/home/nacho/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/nacho/.ssh/id_rsa.
Your public key has been saved in /home/nacho/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:C539VfCLc0H0HTdbdE2u+YU7GiOiMUsMjYt3axhM6Ro [email protected]
The key's randomart image is:
+---[RSA 4096]----+
| oBB|
| .+@|
| . o*|
| oo . o .=o|
| +o o S . o=o.|
| E.++ . . . .oo.|
| .ooo* o . + o .|
| ...o.* . . + . |
| .+ . |
+----[SHA256]-----+
Add your entity to ssh-agent: ssh-add ~/.ssh/id_rsa:
nacho@nacho-mint ~/.ssh $ ssh-add ~/.ssh/id_rsa
Identity added: /home/nacho/.ssh/id_rsa (/home/nacho/.ssh/id_rsa)
Add your public key (id_rsa.pub) to Bitbucket: profile->bitbucket settings->ssh keys
To get the id_rsa.pub contents, run cat $HOME/.ssh/id_rsa.pub
git global username and email.git config --global user.name "Your Name"
git config --global user.email [email protected]
mkdir -p $HOME/dev/radmas && cd $HOME/dev/radmasgit clone [email protected]:radmas/mtc-plus-docker.gitcd $HOME/dev/radmas/mtc-plus-docker$HOME/dev/radmas/mtc-plus-docker/code/mtc_dev running cd $HOME/dev/radmas/mtc-plus-docker/code && git clone [email protected]:radmas/iyc-open010.git mtc_devbin/vars.cfg file starting from the bin/vars.cfg.tpl template. You can use cp vars.cfg.tpl vars.cfg && sed -i 's/vfernando/vhost/g' vars.cfg replacing vhost with your own.bin/create_aliases. It will add some aliases in your $HOME/.zshrc filesource $HOME/.zshrccd ../code/mtc_dev and then bundle installmtc-compose up -drakemtc.v<<developer>>.lan in your browser. (Your domain must be configured in DNS server, ask your administrator)Note: If you just want to use the project in your system and not in a network, you can add your address to /etc/hosts running echo "127.0.0.1 mtc.<<your_vhost>>.lan" | sudo tee --append /etc/hosts
It should work!
cd $HOME/dev/radmas/mtc-plus-docker && wd add dockercd $HOME/dev/radmas/mtc-plus-docker/code/mtc_dev && wd add mtc_devInstall-Linux-tar.txtCreate desktop entry for all users (you can do this later)Open the project located on /home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev
Exclude cache and logs directories in apps/mtc/ and apps/open010 with right clic => Mark Directory As/Excluded
Exclude apps/tools/coverage directory with right clic => Mark Directory As/Excluded
Install Plugins in File/Settings/Plugins, Browse Repositories: Symfony Plugin and PHP Annotations
src/Radmas/Open010Bundle/Resources/translationsapps/mtcapps/mtc/cache/dev/mtcDevDebugProjectContainer.xmlapps/open010/cache/dev/open010DevDebugProjectContainer.xmlapps/mtc/cache/dev/mtcDevUrlGenerator.phpapps/open010/cache/dev/open010DevUrlGenerator.phpExclude angular-modules directories from project in File/Settings/Directories
Configure PHP remote interpreter
localhost2322radmasd0ck3r (save password)Configure Deployment options for docker
v<<developername>>-docker, Type: SFTPlocalhost2322/radmasd0ck3r (save password)/home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev/var/www/mtc_dev//var/www/mtc_dev/webConfigure XDebug
v<<developername>>.lanv<<developername>>.lan80Xdebugtrue
/home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev --> /var/www/mtc_dev/home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev/src --> /var/www/mtc_dev/src/home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev/web --> /var/www/mtc_dev/webConfigure Phpunit
<Project root> -> /var/www/mtc_dev/var/www/mtc_dev/apps/shared/autoload.php)/var/www/mtc_dev/apps/mtc/phpunit.xml/var/www/mtc_dev/apps/shared/bootstrap.php.cacheConfigure External tools:
Configure new Clean Fixtures Tool in File/Settings/Tools/External Tools:
Clean Fixtures with rakeExternal Toolsrakefixtures:clean[test]$ProjectFileDir$Configure new Load Fixtures Tool in File/Settings/Tools/External Tools:
Load Fixtures with rakeExternal Toolsrakefixtures:load[test]$ProjectFileDir$Configure Project Tests
BO tests/home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev/apps/mtc/phpunit.xml)Open010 tests/home/radmas/dev/radmas/mtc-plus-docker/code/mtc_dev/apps/open010/phpunit.xml)Configure Grunt
0.12.17/usr/local/lib/node_modules/grunt-cliRemove User File Headers:
Configure Ruby Highlighting (Optional)
git clone https://github.com/textmate/ruby.tmbundle.gitsudo su and passwdgroupadd radmas and usermod -d /home/radmas -m -g radmas -l radmas <<old_username>> replacing <<old_username>> with your user's name.__rvm_cleanse_variables: function definition file not found error:rm -f ~/.zcompdump*mtc-compose kill && mtc-compose rm -fworkers-compose up -dIf you want build the project without workers again, you can run workers-compose kill && workers-compose rm -f && mtc-compose up -d
Content type
Image
Digest
Size
896 MB
Last updated
about 5 years ago
docker pull radmas/mtc-plus-application