WIP Draft - Example that deploys a golang backend, postgres db and a react frontend where they all talk with each other#83
Draft
psankar wants to merge 4 commits into
Draft
Conversation
razvand
requested changes
Jun 5, 2024
razvand
left a comment
Contributor
There was a problem hiding this comment.
Hi, @psankar . Thanks so much for your contribution.
I tested it. Some remarks:
- Use a stable name (such as
postgres-go-react) for hardcoded instances, in order to allow connection. - Either use
--metro <metroname>or do not use it. But be consistent. - Remove extra white lines.
- Squash your commits into one.
There are some small items to fix, but let's get these out of the way first.
| var err error | ||
| db, err = sql.Open( | ||
| "postgres", | ||
| "user=postgres dbname=postgres password=unikraft host=postgres-wahr0.internal sslmode=disable", |
Contributor
There was a problem hiding this comment.
Suggested change
| "user=postgres dbname=postgres password=unikraft host=postgres-wahr0.internal sslmode=disable", | |
| "user=postgres dbname=postgres password=unikraft host=postgres-go-react.internal sslmode=disable", |
|
|
||
| github.com/kraftcloud/examples/postgres$ kraft cloud volume create --name postgres --size 200 | ||
|
|
||
| github.com/kraftcloud/examples/postgres$ kraft cloud deploy --metro fra0 -M 1024 -e POSTGRES_PASSWORD=unikraft -e PGDATA=/volume/postgres -v postgres:/volume -p 5432:5432/tls . |
Contributor
There was a problem hiding this comment.
Suggested change
| github.com/kraftcloud/examples/postgres$ kraft cloud deploy --metro fra0 -M 1024 -e POSTGRES_PASSWORD=unikraft -e PGDATA=/volume/postgres -v postgres:/volume -p 5432:5432/tls . | |
| github.com/kraftcloud/examples/postgres$ kraft cloud deploy -M 1024 --name postgres-go-react -e POSTGRES_PASSWORD=unikraft -e PGDATA=/volume/postgres -v postgres:/volume -p 5432:5432/tls . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.