bshaffer / oauth2-demo-php

A demo application for running an OAuth2 server
748 stars 279 forks source link

Added Vagrantfile for easy launching #66

Open bluebaroncanada opened 7 years ago

bluebaroncanada commented 7 years ago

Thanks!

bshaffer commented 7 years ago

A Dockerfile would also be a nice touch

bshaffer commented 7 years ago

Also, it would be good to link to Vagrant installation in the README for users who want to try Vagrant but do not have it set up.

bluebaroncanada commented 7 years ago

I could do that, but there are several issues with Docker that really boil down to: Docker is meant for production environments. The idea is to have as little running on one container as possible; separating the web server from the DB. Even setting up SSH is a PITA, whereas for Vagrant you just type vagrant ssh. There's also issues with getting it to run on several different systems including, for example, Windows Home editions. As for the Vangrant installation, I could also do that, but I'd rather just link to Vagrant's own documentation so it's always fresh. Maybe a couple lines of advice. I figure it would be the same as explaining how to install Git. I'll defer to you on both, though. I guess I'd start by trying to find an Docker with xdebug already setup.

bshaffer commented 7 years ago

No, I totally agree about linking to vagrant's documentation. Currently there is no link. Also, I believe further setup is required, as I was receiving errors. So really, just do a few things to flesh out the vagrant instructions:

  1. Link to vangrant's install instructions
  2. Include any additional setup (to resolve the above errors)
  3. Include instructions on how to load the demo (i.e. open localhost:8080)
bluebaroncanada commented 7 years ago

Is that after the changes I posted about an hour ago?

bluebaroncanada commented 7 years ago

Can you try checking out my latest changes and then run vagrant destroy --force && vagrant up?

bshaffer commented 7 years ago

@bluebaroncanada unfortunately I'm still getting the error:

PDOException in Pdo.php line 205:
SQLSTATE[HY000]: General error: 14 unable to open database file
bluebaroncanada commented 7 years ago

So weird. Are you on Mac or Linux by chance and you don't have 777 as the permissions for that directory? Can you give me a list of instructions you're running from git clone ... to vagrant up? It should be so that all you have to do is those two commands.

bluebaroncanada commented 7 years ago

@bshaffer did you check the permissions on your data directory?