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
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ It will setup everything, including https certificates, and will start Docker Co
54
54
55
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.
56
56
57
+
You can always delete existing (if you don't need them) or add your own services by following the same structure.
58
+
57
59
### Services
58
60
59
61
-[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
70
72
# [GENERAL]
71
73
DOMAIN_NAME=your-website.com
72
74
DO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for DNS challenge
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # (optional) for private repos
75
77
76
-
# [REDIS]
77
-
REDIS_PASSWORD=
78
-
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
79
-
80
78
# [POSTGRES]
81
79
POSTGRESQL_USERNAME=admin
82
80
POSTGRESQL_PASSWORD=123456qwerty
83
81
POSTGRESQL_DATABASE=db
82
+
83
+
# [REDIS]
84
+
REDIS_PASSWORD=
85
+
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
84
86
```
85
87
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.
87
94
95
+
#### PostreSQL
88
96
97
+
-`POSTGRESQL_USERNAME` - username for PostgreSQL.
98
+
-`POSTGRESQL_PASSWORD` - password for PostgreSQL.
99
+
-`POSTGRESQL_DATABASE` - name of the database in PostgreSQL.
89
100
90
-
##Tips
101
+
#### Redis
91
102
92
-
---
103
+
-`REDIS_PASSWORD` - password for Redis.
104
+
-`REDIS_DISABLE_COMMANDS` - commands disabled from execution.
93
105
94
-
You can find example `env` file in the root folder.
106
+
## Why?
95
107
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.
97
109
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