Skip to content

Commit 85bf480

Browse files
committed
update workflow to use v1.0.9 and update readme
1 parent f776b8b commit 85bf480

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

samples/nextjs-postgres/.github/workflows/deploy.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Deploy
20-
uses: DefangLabs/[email protected].4
20+
uses: DefangLabs/[email protected].9
2121
with:
22-
config-env-vars: POSTGRES_PASSWORD POSTGRES_URL
22+
config-env-vars: POSTGRES_PASSWORD
2323
env:
24-
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
25-
POSTGRES_URL: ${{ secrets.POSTGRES_URL }}
24+
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}

samples/nextjs-postgres/README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Starter Sample #REMOVE_ME_AFTER_EDITING
1+
# Next.js & Postgres
22

3-
[1-click deploy](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-<YOUR_SAMPLE_DIR#REMOVE_ME_AFTER_EDITING>-template%26template_owner%3DDefangSamples)
3+
[1-click deploy](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-nextjs-postgres-template%26template_owner%3DDefangSamples)
44

5-
This is a sample that shows the rough structure of an actual Defang sample. This top paragraph should give a bit of context about the project and what it does. The rest of the README should be a guide on how to use the sample. #REMOVE_ME_AFTER_EDITING
5+
This is a sample Next.js application that uses Postgres as a database. It is a simple example that demonstrates how to connect to a Postgres database from a Next.js application: on each request it takes the user's IP address, geo-locates it, and stores the result in the database, then displays the last 20 results on the home page.
66

77
## Prerequisites
88

@@ -15,17 +15,15 @@ This is a sample that shows the rough structure of an actual Defang sample. This
1515
To run the application locally, you can use the following command:
1616

1717
```bash
18-
# This might be `docker compose -f compose.dev.yaml up` depending on the project. #REMOVE_ME_AFTER_EDITING
19-
docker compose up
18+
docker compose -f compose.dev.yaml up
2019
```
2120

2221
## Configuration
23-
#REMOVE_ME_AFTER_EDITING - this section should be removed if there are no configuration values needed. The intro text can probably stay, but the list of configuration values should be updated/removed if there are none.
2422

2523
For this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration). Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.
2624

27-
### `API_KEY` #REMOVE_ME_AFTER_EDITING
28-
An explanation of what the env var (`API_KEY`) is, etc.
25+
### `POSTGRES_PASSWORD`
26+
A password that will be used to connect to the Postgres database.
2927

3028

3129
## Deploying

starter-sample/.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Deploy
20-
uses: DefangLabs/[email protected].4
20+
uses: DefangLabs/[email protected].9
2121
#REMOVE_ME_AFTER_EDITING - Replace the following line with the list of environment variables you want to pass to the action
2222
# or remove the lines if you don't need to pass any environment variables/secrets to the action
2323
with:

0 commit comments

Comments
 (0)