Group Group Group Group Group Group Group Group Group

Ch. 6 - After creating Docker user and database

#1

I was able to successfully set up the Docker db, user and password. What I am not sure about is how to access the database. For the next part setting up the server-side application and creating a table for tokens you have to have access to the docker database. Any ideas? Or should I just set up a local mysql database for testing purposes?

#2

@jessemfulton Please check out our Docker tutorial when you get a chance:

https://www.raywenderlich.com/9159-docker-on-macos-getting-started

I hope it helps!

#3

@jessemfulton You should be able to just use whatever you normally do for PostgreSQL database access. For example, you could use the psql command line. The “docker run” command I show in the book maps the ports directly so all you have to do is tell psql that the host is “localhost”, and then use the same database, user and password that you gave to the docker command

#4

Thanks I will go through this to learn it in more detail.

#5

Just an update for those who aren’t too familiar with using psql command line you can install Azure data studio for mac which provides you a gui instead of having to use command line. You just have to add the extension for PostgreSQL from the extensions. The interface is very similar to VS Code (visual studio code). This may be something you want to add to your Push notifications tutorial as well as other sql options.