I have a minishift instance running on my laptop. I am running a Laravel app on it and it's configured to use a private git repository (a copy of repo is present on my laptop from where I push the changes to the git repository). Now my question is
How do I compile assets on it using laravel mix after I make CSS changes on my local repository and push them to the git repo?
Till now I have tried to:
Run npm dev by logging in to minishift using SSH. But it gives the error npm not installed.
The npm package was added to the S2I base image only recently, it may not have got through to official images yet if using the Minishift from the CDK. It should have got through to CentOS based builder images that would be used by Origin based Minishift.
https://github.com/sclorg/s2i-base-container/issues/115
Where did you get Minishift from and what version?
Related
I'm pretty new to Git. I'm developing using PHP/Laravel on at least two machines; both Windows 10, let's call them office and home. I want to keep a sync environment on both. So I created an account on BitBucket.
I created my Laravel app using Laragon using the directory: d:\laragon\www\project
I created a clean remote repo in BitBucket and configured for use on the office PC, inside the project directory:
git init
git remote add origin https://...
git add .
git commit master
git push -u origin master
It copies some of the files to the remote repository. I understand this is because of the .gitignore file, and that's okay.
Now the thing is if I go to my home PC and do a:
git clone http://...
It will only get the non-ignored files. My question is, how do I have to configure the second development environment?
I tried to create a new app at the home's c:\laragon\www\project and then try to clone in this directory, but of course it says the directory is not empty, so does nothing.
Do I have to delete the .gitignore file the first time, so it syncs everything?
I'm assuming that you already have your second machine with the basic set up (php, composer, laravel, local server, node and so on..)
First of all you need to install your composer dependencies (listed in composer.json), to accomplish this run:
composer install
The .gitignore will only ignore.. well.. the desired ignored files, such as: node_modules and .env for example. To solve this, install your dependencies (listed in your package.json, that is not ignored by default) in your second machine using npm or yarn:
npm install
// or
yarn install
In the case of your .env file, I suggest you to clone the .env.example (creating the desired .env) and set your keys in every machine, because any of them can have a different setup.
Of course, your Laravel encryption key needs to be generated, so run:
php artisan key:generate
Finally, migrate your database (and populate it, in case you set up seeders) like this:
php artisan migrate --seed
// notice the '--seed' flag is used when you want to run your seeders
I have already a CodeIgniter application using RestClient and mysql.Chat is running well via Push Notification.
Now Need to integrate real time chat with node js and socket.io. I am new for node js.
Please suggest where I install npm or include the npm module.
Thanks..
The node modules can be installed globally or locally. Usually it goes into root of the project.
Put your project dependencies into package.json file and then execute npm install command.
https://docs.npmjs.com/files/package.json
I came from frontend stack so I can misanderstand something when I'm learning symfony3.
I downloaded Symfony according to documentation with:
php -r "readfile('https://symfony.com/installer');" > symfony
To make php command available i added some values to the enviroment PATH variable (according to this tutorial: https://seiler.it/installing-symfony-framework-into-xampp-for-windows/ - step 2.3) like this:
c:\xampp\mysql\bin;c:\xampp\php;c:\xampp\php\PEAR;C:\xampp\php\symfony
As you see I'm using xampp for PHP development. I added that last, because i copied that downloaded symfony file to c:\xampp\php\symfony directory.
OK, now if i want to use symfony command, like
symfony new project
I need to go to directory where there is that symfony file and add 'php' before, like
php symfony new project
Because simple 'symfony new project' doesn't work (error msg tells about that command isn't known by Windows). How can i fix it?
In frontend there is something like npm (node package manager) with which you can install library/tool locally in directory or globally (to run it in terminal from any place on the computer). Is there is any equivalent in PHP development? I tried to install this by pear (from mentioned tutorial in step 7), but it installed me symfony 1.x version (and error of running that command was that there is no task like 'new') and i want to learn 3, not 1.
I tried to get composer, but i don't see where can i install there symfony globally.
So, how to run symfony globally? What am I missing?
From this doc:
In Windows, move the symfony file to a directory that's included in the PATH environment variable to create the global command or move it to any other directory convenient for you
idea
Install and use Git Bash. Gives you more futures then the windows CLI.
Performance
To run a ten times more fast environment for Symfony i prefer a Linux OS.
I'm new to cPanel and I want to deploy my Symfony2 app on it.
I need some guidance on how to do it,
I downloaded the Symfony2 framework with the Softaculous Apps Installer.
PS : My app is also on BitBucket.
First off all: CPanel is just a web-shell arround your linux os that makes it easy to maintain your server from distance through a web interface.
Actualy you do not need softaculous because it just installs an empty new symfony project.
There are globally two ways to install your symfony project.
Install git and Composer on your server, use git to pull the project from bitbucket and install the the vendors with 'composer install' or 'composer update'.
Upload your complete project from your local computer to the server with FTP.
In both ways you still have to install your database and set your configuration.
If you have a shared online server then just copy the entire symfony project through FTP, set up your database credentials in parameters.yml, and manually delete the prod directory inside var (symfony ≥ 2.8) or app (symfony ≤ 2.7).
I'm trying to add FosUserBundle and HWIOAuthBundle to my symfony project in openshift. In localhost, to add those libraries, I'd to edit composer.json and update the composer.phar. Now I don't know how to update the composer.phar on openshift.
My way(step-by-step):
Create a symfony app from openshift
clone the project to my localhost
edit the composer.json and push it again to openshift
after that, what should I do to update the composer? Or is there another way to add those libraries to the symfony project?
You probably need to setup an action_hook to run the composer command on the openshift server after you do a git push, maybe in the deploy action_hook. Another idea would be to install the libraries locally using composer and then add them into git and push all of it up to the server with a git push and let it all be deployed together. As far as I know composer is not installed on the server, so you may need to install it into your app-root/data directory and call it from there with your deploy hook.
Here is a blog article about using composer with OpenShift: http://stanlemon.net/2013/03/22/composer-on-openshift/ that might help answer your question