Instructor: [0:00] Let's start with a folder for our API. Then we need to cd into this folder and create a Docker Compose file. This is where our Docker configuration is just going to leave in and would specify images for this particular API we're building inside this composed file.
[0:21] Let's edit this file. Basically, what I'm going to do now is to paste this configuration here. What is going on is that I have a Postgres database which uses this password to set up database and connect to it.
[0:39] I have a GraphQL engine which is based off a Hasura GraphQL engine and then it's exposed on port 8080. At the end of the day, when we visit port 8080 we should have access to our API or rather our GraphQL API. Then we're seeing that it depends on the Postgres database it created, and then uses all these environmental variables to set itself up.
[1:03] For example, it's using this database URL to create a connection to the Postgres image we set up before setting up the GraphQL engine. Now I'm going to save this. Once I save this and run Docker Compose up...
[1:26] Now we have our backend set up. If you go to the port I showed you earlier which is the localhost:8080 port and then hit Enter, you should see that we have a GraphQL engine running here. We can basically start doing things like running queries, creating imitations, creating tables and databases, and so on.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!