Skip to content

Conversation

@vdice
Copy link
Contributor

@vdice vdice commented Dec 11, 2024

Ref #49 (comment)

Closes #49

@vdice vdice requested a review from itowlson December 11, 2024 22:34
Then, run the following from the root of this example:

```
export PGUSER=postgres PGHOST=localhost
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I did this I was running createdb and psql inside the container. I guess that isn't needed?

How would you feel about putting these as arguments on the commands (-h / -U) instead of environment variables? Just thinking about Unix/Windows portability here. I don't have a strong feeling about it, just flagging it for consideration. (And I guess since we use RUST_LOG= on the build line it's moot really.)

Copy link
Contributor Author

@vdice vdice Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Always appreciate vigilance on OS-portability! Updated.

export PGUSER=postgres PGHOST=localhost
createdb spin_dev
psql -d spin_dev -f db/testdata.sql
RUST_LOG=spin=trace spin build --up
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider removing the RUST_LOG while we're in here? It seems like it's only likely to clutter the output? (I realise it's a separate change of course. Not a must-do if you want to keep the PR focused.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Signed-off-by: Vaughn Dice <vaughn.dice@fermyon.com>
@vdice vdice force-pushed the docs/postgres-example-readmes branch from 24aab25 to 60b4cfb Compare December 11, 2024 23:11
@vdice vdice merged commit ae62be5 into spinframework:main Dec 11, 2024
3 checks passed
@vdice vdice deleted the docs/postgres-example-readmes branch December 11, 2024 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Examples: further postgres setup?

2 participants