-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX related issues #18
Comments
I've also tried several times to get this working on my Mac and yet to On Mon, Jun 22, 2015 at 9:30 AM, Roger Stuckey notifications@github.com
William J. Sankey |
@stuckeyr Thanks for the detailed report. I'm in the process of re-writing the That error you're experiencing at the end is mostly due to skimpy documentation on my part because I planned to create much better docs in the future. To set up a brand new database for now (just to get rolling), you can run the 2 commands below: docker exec -it buildasaasappwithflask_postgres_1 createdb -U postgres buildasaasappwithflask
docker exec -it buildasaasappwithflask_postgres_1 psql -U postgres -c "CREATE USER buildasaasappwithflask WITH PASSWORD 'securepassword'; GRANT ALL PRIVILEGES ON DATABASE buildasaasappwithflask to buildasaasappwithflask;" Then, ensure https://github.com/nickjj/build-a-saas-app-with-flask/blob/master/docker-compose.yml#L4 Here's 2 main take aways:
For the second take away, you can always run As for the mac related issues. I don't personally use a Mac but I know a lot of devs do. When it comes time to record the screencasts I will try to get my hands on a Mac and create a short video on setting up boot2docker in such a way that once it's done it will align with the rest of the series. |
I've pushed a new build to master that has the improved Of course your |
Thanks Nick. I changed the username in
and
Unfortunately, I'm still getting errors :-(
The docker-compose log complains:
Incidentally, I switched to dinghy from boot2docker to address my previous issues and it seems to work well. For anyone else interested in trying it, don't forget to remove the |
Did you pull in the changes from master? |
Yep. By the way, the first time I
Here's the output of
|
Oh, it uses https://github.com/nickjj/build-a-saas-app-with-flask/blob/master/config/settings.py#L7 There's 3 places to keep track of all db info: Settings file:
Docker compose config:
|
Yes, I noticed that. I still get the role error if I change:
|
Can you paste the output of the following 2 commands:
|
Everything seems to be there...
|
Is the role error preventing you from doing anything? A common work flow to refresh everything would be:
I use the above commands to purge everything, or to perform a schema change without wanting to create a migration. Alternatively if you just run Edit: To be clear, the |
Yes, it's preventing me from going any further. The commands you suggested produce the same error :-( |
No problem. I will do a full test on a brand new virtual machine sometime later today or tomorrow and fix issues that arise. If anyone else has issues related to this between now and then, please post them here. |
I spun up a fresh VM last night. I was able to get everything working without issues. You will see errors/warnings when running You may see additional errors about other apps using the database too, in this case you should stop your flask server before running the |
Started from scratch, this time, using 'catwatch' for the db name... Same result :-( |
I'm not sure if it's a permission issue. You were able to create the database so it's capable of writing to disk. There's a lot of people using docker successfully with osx, I'll try to get a friend who has a mac to do a test run. |
Finally figured it out! You were right - it wasn't an issue with the permissions. I had inadvertently been connecting to my local postgresql server (I thought I'd shut it down), which I'm guessing the other services - redis & faye - couldn't see. That was only half the problem though: My VM hadn't exposed all the necessary ports (specifically, postgres: 5432) to the host. There are a couple of ways to do this, but I since I was using dinghy, I ended up using an http proxy by setting the
And using the same virtual host in
I assume I'll need to do the same for redis ad faye, but haven't gotten around to those yet. Oh, and one other amendment I forgot to mention earlier was to When I'm confident everything's set up correctly, I'll run the tests... |
@stuckeyr Do you think you would try boot2docker again in the future once the certificate bug is fixed? It's schedule to be fixed in 1.7.1 which should be out before the videos are released. Once fixed you shouldn't have to install anything extra or mess around the boot2docker image. I did run into the same certificate issues as you, it seems to be a bug affecting a lot of Mac users. |
@nickjj Yep, sure. I kinda like dinghy/vagrant, but It would be nice to have a plain vanilla solution that didn't require any mucking around! |
Going to close this for now as it's no longer an issue. |
I had many issues getting the Docker containers going on my Mac, so I thought I'd share some workarounds here. I'm fairly new to Docker, so there may be mistakes! There are a couple of project-related issues at the end too :-)
First, install Docker, boot2docker and Docker-compose.
There are problems with the permissions on vboxsf mounts, preventing postgres from writing to /var/lib/postgresql/data. You need to either change the access permissions, or mount to your home folder using nfs instead. The latter is described here: http://syskall.com/using-boot2docker-using-nfs-instead-of-vboxsf/
You should also add "$(boot2docker shellinit 2> /dev/null)" to the bottom of your ~/.bash_profile.
Next, you may need to fix the ip/certification bug. To edit the profile, run:
Now when you reach the initialization stage, you need to issue:
to create the manifest.json first, before issuing
run
to see a list of what's available.You then may need to replace all instances of "website_postgres_1" in cli/commands/cmd_db.py with the correct name of the postgresql host (eg. "buildasaasappwithflask_postgres_1").
The last issue is unresolved. When I try to initialize the database, I get the following error:
So now I'm stuck!
Thanks for the great project, Nick. I look forward to the finished product!
The text was updated successfully, but these errors were encountered: