Skip to content

Commit bbffefc

Browse files
authored
Merge b3bbef8738d197cbf4ec249ae9f3df0d2d3cc0aa into d72e12c2ddad8d5375da007e713422dcae7fab5b
2 parents 7ea7880 + 4d4d0f1 commit bbffefc

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.github/workflows/deploy.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- pr-test/*
8+
9+
concurrency:
10+
group: deploy
11+
cancel-in-progress: false
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v4
22+
23+
- name: Install defang
24+
run: . <(curl -Ls https://s.defang.io/install)
25+
26+
- name: Login to Defang
27+
run: defang login
28+
29+
- name: Deploy
30+
run: defang compose up -v --detach

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# About this project
2+
23
This sample project demonstrates how to deploy a full-stack application using React for the frontend, Node.js for the backend, and PostgreSQL for the database. The project uses Docker to containerize the services, making it easy to run in both development and production environments.
34

45
In this sample, we have set up the essential files you need to deploy in production using [Neon](https://neon.tech/) to host your database. We use a connection string to connect Neon to your code. By replacing the pre-configured connection string at .env and at the compose file to yours, you will be ready to deploy this sample with Neon.
@@ -14,6 +15,7 @@ In this sample, we have set up the essential files you need to deploy in product
1415
To start the development environment, run `docker compose -f ./compose.yaml -f ./compose.dev.yaml up`. This will start the Postgres container, the React container, and the NodeJS container. The development container (compose.dev.yaml) will override the production container (compose.yaml).
1516

1617
Or run without using Docker by doing the following:
18+
1719
1. run npm install to install the nodejs dependencies in both the `client` directory and the `server` directory
1820
2. create or modify the .env file in both the `client` directory and the `server` directory with localhost, or create a .env.local to override the .env file.
1921
3. run npm start
@@ -28,7 +30,7 @@ Or run without using Docker by doing the following:
2830

2931
---
3032

31-
Title: React, Node.js, and PostgreSQL
33+
Title: React & Node.js & PostgreSQL
3234

3335
Short Description: A full-stack to-do list application
3436

compose.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
name: nodejs-react-postgres
21
services:
32
todo_list:
43
build:

0 commit comments

Comments
 (0)