Skip to content

Commit a6b103e

Browse files
committed
better readme
1 parent daf98c4 commit a6b103e

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

.env.example

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# [GENERAL]
22
DOMAIN_NAME=your-website.com
33
DO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for DNS challenge
4-
ACME_EMAIL=[email protected] # for https certificates
5-
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for private repos
6-
7-
# [REDIS]
8-
REDIS_PASSWORD=
9-
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
4+
ACME_EMAIL=[email protected] # for let's encrypt
5+
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # (optional) for private repos
106

117
# [POSTGRES]
128
POSTGRESQL_USERNAME=admin
139
POSTGRESQL_PASSWORD=123456qwerty
14-
POSTGRESQL_DATABASE=db
10+
POSTGRESQL_DATABASE=db
11+
12+
# [REDIS]
13+
REDIS_PASSWORD=
14+
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ It will setup everything, including https certificates, and will start Docker Co
5454

5555
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.
5656

57+
You can always delete existing (if you don't need them) or add your own services by following the same structure.
58+
5759
### Services
5860

5961
- [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).
@@ -70,29 +72,39 @@ Current setup requires you to fill in `.env` file with variables that are used i
7072
# [GENERAL]
7173
DOMAIN_NAME=your-website.com
7274
DO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for DNS challenge
73-
[email protected] # for https certificates
75+
[email protected] # for let's encrypt
7476
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # (optional) for private repos
7577
76-
# [REDIS]
77-
REDIS_PASSWORD=
78-
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
79-
8078
# [POSTGRES]
8179
POSTGRESQL_USERNAME=admin
8280
POSTGRESQL_PASSWORD=123456qwerty
8381
POSTGRESQL_DATABASE=db
82+
83+
# [REDIS]
84+
REDIS_PASSWORD=
85+
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
8486
```
8587

86-
#### `DOMAIN_NAME`
88+
#### General
89+
90+
- `DOMAIN_NAME` - your registered domain.
91+
- `DO_AUTH_TOKEN` - Digital Ocean token that is going to be used for DNS challenge and generating https certificates. It's required by Traefik and they provide other options, you can find them [here](https://doc.traefik.io/traefik/https/acme/#providers). If you'd like to continue with Digital Ocean, then you can create a token in `Dashboard` -> `API` -> `Tokens/Keys`.
92+
- `ACME_EMAIL` - email that is used for [Let's Encrypt](https://letsencrypt.org) and `https` certificates.
93+
- `GITHUB_TOKEN` - github token for private repos.
8794

95+
#### PostreSQL
8896

97+
- `POSTGRESQL_USERNAME` - username for PostgreSQL.
98+
- `POSTGRESQL_PASSWORD` - password for PostgreSQL.
99+
- `POSTGRESQL_DATABASE` - name of the database in PostgreSQL.
89100

90-
## Tips
101+
#### Redis
91102

92-
---
103+
- `REDIS_PASSWORD` - password for Redis.
104+
- `REDIS_DISABLE_COMMANDS` - commands disabled from execution.
93105

94-
You can find example `env` file in the root folder.
106+
## Why?
95107

96-
`DO_AUTH_TOKEN` is used to generate https certificates against [DigitalOcean](https://digitalocean.com) challenge. You can generate one in the DO Networking dashboard or choose one of the [available providers](https://doc.traefik.io/traefik/https/acme/#providers).
108+
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.
97109

98-
---
110+
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.

0 commit comments

Comments
 (0)