Then after a longish reboot (half an hour), the new operating system came up, and I was pretty soundly asleep by then. I finally realized that I had to go back to the Apple Store and click the "update" button. Once I downloaded the software (and had a nice dinner with a bit of wine, returning home late in the evening), I thought merely rebooting the computer would result in the new OS. I don't know if this is necessary, but who wants to risk a partial download, even if the download can be restarted. I remembered to change my Energy Saver Options so the computer would never turn off. ![]() Even on Verizon FIOS, that took several hours. Eventually it all came through - 5+ Gbytes worth. I had problems with my AppleId, and had to verify my billing information. Upgrading the operating system should be free. That is a pain, because I don't really remember all of them, but a bearable pain. So far, the only issue upgrading to Mac OS 10.10 is that the OS forgot my network passwords. I did some preliminary research on potential problems. After all, my Mac has been asking about this for a long time. So, I bit the bullet to upgrade the operating system. And, Apple didn't seem to offer a version compatible with slightly out-of-date operating systems. Alas, this download did not work for the Mac OS version I had. Fortunately, Apple offers a free package that has this and many other capabilities, located right here. For some reason, this installation requires the ability to compile code. The simplicity of installing Python lures you into an automated slumber, thinking "all this should work really easily". (If the link doesn't work, it is easy to find with Google.)īut, this is where the trouble began. (If the link doesn't work, it is easy to find with Google.) Getting and installing the latest version of Python is really easy. Attempt to install psycopg2, the package that links Python to Postgres.Previously, parentheses were not allowed. A very notable one is that the commonly used print command is now a function and requires parentheses. For those who do not know, Python changed some of its syntactic conventions between versions 2 and 3. However, I figured that I like parentheses errors when I print, so I would go with the latest and greatest: python 3.4. Hence, this description of my experience and my solutions. Several days later, I have succeeded! Along the way, I may have learned a thing or two that would help others. So, I downloaded Python onto my Mac running OS 10.8.x and decided to connect it to my local Postgres database. Models.InitDB(psqlDatabaseConnectionString)įunc usersList(w http.ResponseWriter, r *http.I've decided that I want to learn a bit more about Python. Var psqlDatabaseConnectionString = fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable", I can also run docker-compose up, which gives the connection refused error, then ctrl+C, then run go run basicapi and get the expected behavior. To run them separately I'm using these commands: docker run -rm -name postgres-db -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v /Users/ForeignFood/Development/go/src//skillitzimberg/docker/volumes/postgres:/var/lib/postgresql/data postgres ![]() When I run the postgres container and the Go app separately I get the expected behavior. I have tried reversing the order of the services in the docker-compose.yml but they appear to start up in the same order either way. In the docker-compose.yml I have tried using these statements: depends_on: Postgres is saying: listening on IPv4 address "0.0.0.0", port 5432. The app container is trying: dial tcp 172.22.0.2:5432. "postgres-db" (as it's named in the docker-compose.yml), I have tried using these host names in the app connection string: I have two services: db-access (that's the Go app) and postgres-db. Judging by the error message, I don't think I'm even getting that far. I have app code that should be giving the database time to start up to address the first potential problem (see code below). Two, the app is simply using an invalid IP. One, the database is not running when the app is trying to connect. I think that there are potentially two different problems: Using docker-compose up I get the connection refused error. I'm using two docker images: the official postgres image and my own Go app and Dockerfile. It's likely that I use incorrect terminology and/or am more confused than I think I am. ![]() This project is just for my own understanding.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |