You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-15Lines changed: 52 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,23 @@
1
-
# https-backend
1
+
# 🔐 Universal Backend Setup
2
2
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.
4
4
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
6
12
7
13
1. Connect to the remote server
8
14
9
15
```bash
10
16
> ssh root@IP_ADDRESS
11
17
```
12
18
19
+
> Hint: you can use a cloud computing providers such as [DigitalOcean](https://digitalocean.com).
20
+
13
21
2. Clone this repo
14
22
15
23
```bash
@@ -24,33 +32,62 @@ This repository is a minimal setup for running your services with Docker (Compos
24
32
> nano .env
25
33
```
26
34
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.
It will fetch the following repo `https://github.com/starters-dev/nextjs-tailwindcss`
34
-
35
45
5. Build and run
36
46
37
47
```bash
38
-
> bash run/build.sh
48
+
> bash build.sh
39
49
```
40
50
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.
42
52
43
-
## Tips
53
+
## What's inside
44
54
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.
46
56
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
48
58
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
0 commit comments