Skip to content

Commit daf98c4

Browse files
committed
Update README.md
1 parent e52053a commit daf98c4

File tree

1 file changed

+52
-15
lines changed

1 file changed

+52
-15
lines changed

README.md

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
# https-backend
1+
# 🔐 Universal Backend Setup
22

3-
This repository is a minimal setup for running your services with Docker (Compose) behind Traefik proxy and with autogenerated HTTPS certificates. That means if you have the `API` service (e.g. NodeJS app) and would like to make it available through `https://api.your-domain.com`, then you are at the right place.
3+
This repository is a minimalistic setup for running your services with Docker Compose behind Traefik with autogenerated `https` certificates.
44

5-
## Quickstart
5+
Let's say, you have the `API` service (e.g. NodeJS app), React app for frontend and would like to make it available via `https://api.your-domain.com` and `https://dashboard.your-domain.com`, then you are at the right place!
6+
7+
> _HTTPS Backend_ is a part of [starters.dev](https://github.com/starters-dev) collection.
8+
9+
## Getting Started
10+
11+
### Quickstart
612

713
1. Connect to the remote server
814

915
```bash
1016
> ssh root@IP_ADDRESS
1117
```
1218

19+
> Hint: you can use a cloud computing providers such as [DigitalOcean](https://digitalocean.com).
20+
1321
2. Clone this repo
1422

1523
```bash
@@ -24,33 +32,62 @@ This repository is a minimal setup for running your services with Docker (Compos
2432
> nano .env
2533
```
2634

27-
4. Get the service repo (e.g. `nextjs-tailwindcss`)
35+
Check [Environment variables](#environment-variables) section for more information.
36+
37+
4. Get a service repo
38+
39+
> Our example is based on [backend.starters.dev-website](https://github.com/starters-dev/backend.starters.dev-website) repo.
2840
2941
```bash
30-
> bash run/get-repo.sh nextjs-tailwindcss
42+
> git clone https://github.com/starters-dev/backend.starters.dev-website services/website
3143
```
3244

33-
It will fetch the following repo `https://github.com/starters-dev/nextjs-tailwindcss`
34-
3545
5. Build and run
3646

3747
```bash
38-
> bash run/build.sh
48+
> bash build.sh
3949
```
4050

41-
It will setup everything, including ACME (https certificates), and will run docker.
51+
It will setup everything, including https certificates, and will start Docker Compose services in the background.
4252

43-
## Tips
53+
## What's inside
4454

45-
---
55+
This setup is using [Traefik](https://github.com/traefik/traefik), the cloud native application proxy, that simplifies the process of getting `https` certificates and the way to describe services.
4656

47-
If you'd like to add your service or from [starters-dev](https://github.com/starters-dev), create a dedicated `docker-compose.your-service.yml` file and add it to `run/build.sh` and then run:
57+
### Services
4858

49-
```bash
50-
> bash run/get-repo.sh <service-repo>
59+
- [PostgreSQL](https://www.postgresql.org) - open source object-relational database known for reliability and data integrity. It uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/postgresql).
60+
- [Redis](https://redis.io) - open source, in-memory data store used by millions of developers as a database, cache, streaming engine, and message broker. It uses [Bitnami Docker image](https://hub.docker.com/r/bitnami/redis).
61+
- [React App](https://backend.starters.dev) - sample frontend app. It uses [backend.starters.dev-website](https://github.com/starters-dev/backend.starters.dev-website) repo
62+
63+
> more services will be added...
64+
65+
## Environment variables
66+
67+
Current setup requires you to fill in `.env` file with variables that are used in services.
68+
69+
```
70+
# [GENERAL]
71+
DOMAIN_NAME=your-website.com
72+
DO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for DNS challenge
73+
[email protected] # for https certificates
74+
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # (optional) for private repos
75+
76+
# [REDIS]
77+
REDIS_PASSWORD=
78+
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
79+
80+
# [POSTGRES]
81+
POSTGRESQL_USERNAME=admin
82+
POSTGRESQL_PASSWORD=123456qwerty
83+
POSTGRESQL_DATABASE=db
5184
```
5285

53-
---
86+
#### `DOMAIN_NAME`
87+
88+
89+
90+
## Tips
5491

5592
---
5693

0 commit comments

Comments
 (0)