Where to locate Symfony project created in Vagrant? - symfony

Hey guys I'm new to vagrant. I have used Homestead box. I have created Symfony4 Project but seems I can't locate the project folder..
Create Project In.
vagrant#homestead:~$ composer create-project symfony/website-skeleton Symfony-Demo
Homestead.yaml Config
folders:
- map: C:\homestead
to: /home/vagrant/homestead
sites:
- map: Symfony-Demo.test
to: /home/vagrant/Symfony-Demo/public
type: symfony4
Symfony-Demo.test is running well in browser.
Your application is now ready. You can start working on it at:
/home/vagrant/Symfony-Demo/
The problem is I don't know where the project is located.. C:\homestead is just empty..

Folder sharing in windows is just tricky...
did you first create the folder on windows? vagrant guest reads what's on the host, not the other way around as usually implied in the doc
did you switch to using winRM, which is a lot more efficient for windows?
are you kicking up vagrant from a command window run as administrator? are you using an administrator-level account to log in to winRM?

Related

After installing Django CMS, system asks for admin credentials

I'm trying to use Django CMS for a website project. I've installed it from my virtual environment by entering the following command: pip install djangocms-installer
Things seemingly went well.
After that I created a new project on my desktop by typing: djangocms -p communimmo communimmo
It was created successfully.
The last lines in my command prompt showed:
Creating admin user
All done!
Get into "MyProjectPath" directory and type "python manage.py runserver" to start your project
But after running python manage.py runserver, the webpage on my local server asks me for Django Administration credentials. At no point during the installation I was asked to set up an admin user, so basically I'm stuck.
Did I miss a step somewhere?
Thanks!
Found it.
https://docs.django-cms.org/en/latest/introduction/01-install.html#use-the-django-cms-installer.
The installer creates an admin user for you, with username/password admin/admin.

How do I read a file from the local file system from inside a meteor app?

I have a meteor app that needs to periodically read a file located on the host's file system, outside of the app package. I am using node's fs to accomplish this, and it works fine on my (macOS) development machine.
However, when I run mup deploy to deploy it to my (Ubuntu 14) server, mup returns the following error after starting meteor:
Error: ENOENT: no such file or directory, open '/home/sam/data/all_data.json'
at Object.fs.openSync (fs.js:652:18)
at Object.fs.readFileSync (fs.js:553:33)
Does anyone know why this might be happening?
you should follow mup documentation closely. Have you seen volumes setup in mup config? Try this to solve your issue.
Reason: mup runs app in docker without any access to host file system unless specified. Volumes setup does this for you with mup deployment.
Below is the part of mup config from http://meteor-up.com/docs.html, Everything Configured, read more to get a better idea.
name: 'app',
path: '../app',
// lets you add docker volumes (optional). Can be used to
// store files between app deploys and restarts.
volumes: {
// passed as '-v /host/path:/container/path' to the docker run command
'/host/path': '/container/path',
'/second/host/path': '/second/container/path'
},
The user you have that is running your meteor build on the server needs to have access to that folder - read access. I would store the file in a different directory than the home one, because you don't want to mess it up. Either way doing something like chmod -R 444 /home/sam/data should give read access to any user for all files in that directory. You are probably running meteor as your local user(sam?) in development mode on your macOS, but the built up gets run as meteor or some other user on ubuntu, because of mup and forever.

Sulu CMS not working after installation

Trying to install and configure Sulu CMS.
I am using Homestead and have configured the vhosts to welcome a new site and have run vagrant provision:
sites:
- map: sulu.cms
to: /home/vagrant/Code/sulu_cms/public
I have pulled sulu-standard from the GIT repo, checkedout, ran composer install and followed the instructions given here to the dot. I am also using the Nginx configuration shown here and the default Webspace provided by the installation.
However, when trying to access the host after I am getting a 502 Bad Gateway error. Could anyone enlighten me on the issue?
I am running Homestead on Windows 10, I have a couple of other Laravel-based projects running in the same Homestead box without any issues.
You've also created an issue for that on Github and posted the answer there. You've mentioned there that the vagrant mapping was incorrect, because it showed to a non-existent public directory instead of the web directory.
So the correct vagrant mapping would look like this:
sites:
- map: sulu.cms
to: /home/vagrant/Code/sulu_cms/web
Would be nice if you could also mark this as the accepted answer, or create a more detailed one on your own.

Meteor package incorrect folder name

I just ran the following meteor command:
sudo meteor create --package blah:my-package
and meteor has created a folder called TECM60~2 ... I thought it was supposed to create a folder with the package name - any ideas?
Note: I am running Ubuntu on Virtualbox (developing on Windows) and accessing the package folder via a Samba share to Windows Explorer. I suspect this problem is because Windows does not allow colons in folder names (?)
As per Ethaan's comment, it is possible to create packages without the username: in front of it. I did raise this with the Meteor team and they said they will address this in a fuuture release.

Fail to clear cache with Symfony on Vagrant

I'm using Vagrant on Windows with a box created on PuPHPet (Debian 7 and PHP 5.4). I installed a new project with Symfony 2 and there is some errors to clear the cache like "Cannot rename" or "Failed to remove directory".
I used the default configuration but also tried to:
enable NSF
follow the "Setting up Permissions" part on the Symfony guide
specify www-data as user/group for /var/www
change vagrant as apache user/group
and nothing changed, still the same errors.
How can I set the right permissions on the Symfony's cache with Vagrant?
Thank you
PHPStorm (there's Community Edition) has auto upload feature, which I successfully used for Vagrant file sharing. However you need to disable Vagrant's file sharing (NFS doesn't work with Windows out of the box anyway).
This is one say sync, thus you need to clear cache from inside of box.
Settings > Deployment (path to settings page depends on IDE version) add deployment server:
Connection tab:
Type: SFTP
Host: box IP
Port: 22
Username: vagrant
Password: vagrant
If I recall correctly PuPHPet disables password login in favor of key
based access, so use appropriate method (key was publicly stored in puphpet's repo).
Mapping tab:
Local path: project root locally
Deployment path: project root in box
Settings > Deployment > Options:
Upload automatically: Always
Upload external changes: Yes
Delete target items when source does not exist: Yes
There's NFS Vagrant plugin for Windows, but I could not get it to run as of March 2015.
There's also rsync sync method from Vagrant which offers one way sync as well, but I liked PHPStorm's autoupload more.

Resources