Skip to content

Commit 7a426c1

Browse files
committed
Update README.md
1 parent 293a4f9 commit 7a426c1

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

README.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,26 @@ Check [Environment variables](#environment-variables) section for more informati
5858

5959
It will setup everything, including https certificates, and will start Docker Compose services in the background.
6060

61+
### Service creation
62+
63+
If you'd like to add your own service, then you should follow the steps below to keep the same structure:
64+
65+
1. Add service's Docker Compose file `services/docker-compose.YOUR_SERVICE.yml`.
66+
67+
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+
6181
## Structure
6282

6383
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
88108

89109
Current setup requires you to fill in `.env` file with variables that are used in services.
90110

91-
```
92-
# [GENERAL]
93-
DOMAIN_NAME=your-website.com
94-
DO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxx # for DNS challenge
95-
[email protected] # for let's encrypt
96-
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-
108111
#### General
109112

110113
- `DOMAIN_NAME` - your registered domain.
111114
- `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`.
112115
- `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.
114117

115-
#### PostreSQL
118+
<details>
119+
<summary>PostgreSQL</summary>
116120

117121
- `POSTGRESQL_USERNAME` - username for PostgreSQL.
118122
- `POSTGRESQL_PASSWORD` - password for PostgreSQL.
119123
- `POSTGRESQL_DATABASE` - name of the database in PostgreSQL.
120124

121-
#### Redis
125+
</details>
126+
127+
<details>
128+
<summary>Redis</summary>
122129

123130
- `REDIS_PASSWORD` - password for Redis.
124131
- `REDIS_DISABLE_COMMANDS` - commands disabled from execution.
125132

133+
</details>
134+
126135
## Enhancements
127136

128137
There are still some things I would like to add to the backend setup:

0 commit comments

Comments
 (0)