Skip to content

Commit cf03820

Browse files
committed
better docs
1 parent a6b35d5 commit cf03820

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# 🔐 Universal Backend
1+
# 🔐 Universal HTTPS Backend
22

33
![Traefik](https://img.shields.io/badge/Proxy-Traefik-skyblue)
4+
![HTTPS](https://img.shields.io/badge/HTTPS-Configured-green)
45
![PostgreSQL](https://img.shields.io/badge/Database-PostgreSQL-blue)
56
![Redis](https://img.shields.io/badge/Cache-Redis-red)
67
![Website](https://img.shields.io/badge/Website-React%20App-blue)
@@ -15,7 +16,7 @@ Let's say, you have the `API` service (e.g. NodeJS app), React app for frontend
1516

1617
### Quickstart
1718

18-
1. Connect to the remote server
19+
1. Connect to your remote server
1920

2021
```bash
2122
> ssh root@IP_ADDRESS
@@ -30,10 +31,10 @@ Let's say, you have the `API` service (e.g. NodeJS app), React app for frontend
3031
> cd backend
3132
```
3233

33-
3. Fill in `.env` file with your information
34+
3. Run `setup` script and fill in `env` variables
3435

3536
```bash
36-
> mv .env.example .env
37+
> bash setup.sh
3738
> nano .env
3839
```
3940

@@ -57,10 +58,10 @@ It will setup everything, including https certificates, and will start Docker Co
5758

5859
## Structure
5960

60-
The folder structure is pretty simple but makes you reuse and write less boilerplate code.
61+
The folder structure is pretty simple but lets you reuse and write less boilerplate code.
6162

6263
- `docker-compose.main.yml` - main Docker Compose file with DNS challence, ACME and ports configuration.
63-
- `build.sh` - `build` script that runs `setup` script with all scripts under `run/services` folder, builds and runs Docker images in background.
64+
- `build.sh` - `build` script that runs `setup` script with all scripts under `run/services` folder and builds and runs Docker images in background.
6465
- `.env` - list of environment variables.
6566
- `run/` - folder with general bash scripts.
6667
- `run/services/` - folder with bash scripts for a specific service.
@@ -125,3 +126,7 @@ REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
125126
While developing `API` and similar services for mobile apps, you can not really access `localhost` (on mobile device) if, let's say, you have running Docker image on you local machine. Also you have to make only `https` requests from mobile app.
126127

127128
Another reason was to have `PostgreSQL` and `Redis` always running in the cloud but for cheap cost. You can run both of them easily on less than $5 server.
129+
130+
#### Note
131+
132+
This backend setup is a great fit if you just want to start writing business logic without messing with DevOps and spending a few days on that what's already has been done for you. It can be used for development and early production stages (of course, depends on your project), however, it's strongly **recommended** to have services like `PostgreSQL`, `Redis`, and similar to be seperated and independent on production stage.

0 commit comments

Comments
 (0)