Closed elie-h closed 8 years ago
If you're using OSX you're probably running everything through the docker toolbox.
You'll need to use your docker machine IP address instead of localhost in a few places. Goto the config/settings.py
file and do a find/replace on localhost
to YOUR_DOCKER_MACHINE_IP
.
You can find out your docker machine's IP address by running: docker-machine ip default
.
In this case the error is likely due to it not being able to find postgres running on localhost.
For getting more informative errors when running CLI commands change this: https://github.com/nickjj/build-a-saas-app-with-flask/blob/master/cli/cli.py#L37-L44
To remove the try/catch block by changing that to:
if sys.version_info[0] == 2:
name = name.encode('ascii', 'replace')
mod = __import__('cli.commands.cmd_' + name,
None, None, ['cli'])
Also on a semi-related note, make sure you use named docker volumes instead of using a path in the docker-compose.yml
file.
I created a gist the other day to help someone else on OSX. It contains a work flow for my previous comment as well as what I just mentioned above.
Let me know if this works for you: https://gist.github.com/nickjj/7c3a2a3447a06a1d9a66
Ok great it works now! had to replace the local hosts with the IP.
From the notes I followed it said to delete the lines regarding volumes for Mac users. I'll try that solution out and let you know if I have any issues.
@eliehamouche Did it work? If so, please close this ticket.
Closing after 2+ weeks of inactivity, it's likely fixed. Please re-open it if it didn't.
Hi Nick, I'm trying to run the app on OSX. When I try to initialise the database I keep getting:
I ran docker-compose up beforehand. Any ideas?