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
2.`(optional)` Add service's folder `services/YOUR_SERVICE`. For example, if you are going to store some data or configuration files only related to that service.
68
+
69
+
3.`(optional)` Add service's script file `run/services/YOUR_SERVICE.sh`. For example, if you need to craete some folders in advance on `setup` step.
70
+
71
+
### Service deletion
72
+
73
+
If you don't need a service, you can easily delete it by running:
74
+
75
+
```bash
76
+
> bash run/sdel.sh SERVICE_NAME
77
+
```
78
+
79
+
For example, if you don't need `postgresql` service, you will run `bash run/sdel.sh postgresql` and it will delete related files.
80
+
61
81
## Structure
62
82
63
83
The folder structure is pretty simple but lets you reuse and write less boilerplate code.
@@ -88,41 +108,30 @@ You can always delete existing (if you don't need them) or add your own services
88
108
89
109
Current setup requires you to fill in `.env` file with variables that are used in services.
90
110
91
-
```
92
-
# [GENERAL]
93
-
DOMAIN_NAME=your-website.com
94
-
DO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for DNS challenge
GITHUB_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # (optional) for private repos
97
-
98
-
# [POSTGRES]
99
-
POSTGRESQL_USERNAME=admin
100
-
POSTGRESQL_PASSWORD=123456qwerty
101
-
POSTGRESQL_DATABASE=db
102
-
103
-
# [REDIS]
104
-
REDIS_PASSWORD=
105
-
REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
106
-
```
107
-
108
111
#### General
109
112
110
113
-`DOMAIN_NAME` - your registered domain.
111
114
-`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`.
112
115
-`ACME_EMAIL` - email that is used for [Let's Encrypt](https://letsencrypt.org) and `https` certificates.
113
-
-`GITHUB_TOKEN` - github token for private repos.
116
+
-`GITHUB_TOKEN` - `(optional)`github token for private repos.
114
117
115
-
#### PostreSQL
118
+
<details>
119
+
<summary>PostgreSQL</summary>
116
120
117
121
-`POSTGRESQL_USERNAME` - username for PostgreSQL.
118
122
-`POSTGRESQL_PASSWORD` - password for PostgreSQL.
119
123
-`POSTGRESQL_DATABASE` - name of the database in PostgreSQL.
120
124
121
-
#### Redis
125
+
</details>
126
+
127
+
<details>
128
+
<summary>Redis</summary>
122
129
123
130
-`REDIS_PASSWORD` - password for Redis.
124
131
-`REDIS_DISABLE_COMMANDS` - commands disabled from execution.
125
132
133
+
</details>
134
+
126
135
## Enhancements
127
136
128
137
There are still some things I would like to add to the backend setup:
0 commit comments