Skip to content

Commit e3fa810

Browse files
committed
mass update of configs
time spent: 2h 50m
1 parent 7304e7e commit e3fa810

17 files changed

+181
-45
lines changed

README.md

+38-32
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Warning: This setup doesn't provide high level of security or any [high availabi
77
Also you can check [Awesome Selfhosted](https://github.com/awesome-selfhosted/awesome-selfhosted) and [Free for Dev](https://free-for.dev/) for more options ;)
88

99
Time track:
10-
- [Filipp Frizzy](https://github.com/Friz-zy/): 57h 45m for 14 days
10+
- [Filipp Frizzy](https://github.com/Friz-zy/): 60h 35m for 15 days
1111

1212
## Available and planned open source components
1313

@@ -38,7 +38,7 @@ Time track:
3838
* [Backlog] [Owncloud](https://owncloud.com/) as cloud storage
3939

4040
### Chat
41-
* [DONE] [rocket](https://rocket.chat/)
41+
* [DONE] [Rocket](https://rocket.chat/)
4242
* [Backlog] [Mattermost](https://mattermost.com/)
4343
* [Backlog] [Twake](https://twake.app/) as alternative to Microsoft Teams
4444
* [Backlog] [Wire](https://wire.com) as alternative to Microsoft Teams
@@ -61,8 +61,13 @@ You can support this or any other of my projects
6161

6262
## Setup
6363

64-
All operations should be executed from root on target machine. You can use your laptop or some server.
65-
You need a valid domain name pointed to this server for automatically setting up https with [traefik](https://traefik.io) and [letsencrypt](https://letsencrypt.org). However, you can [hack your hosts file](https://docs.rackspace.com/support/how-to/modify-your-hosts-file/) for working without https.
64+
All operations should be executed from root on target machine. You can use your laptop or some server. For running all services you need at least 2 cpu cores, 8gb memory and 20gb of free disk space. You can find cheap servers on [hetzner.com](https://www.hetzner.com/cloud) or compare small hosters on [vps.today](https://vps.today/).
65+
66+
You also need a valid domain name pointed to this server for automatically setting up https with [traefik](https://traefik.io) and [letsencrypt](https://letsencrypt.org). However, you can [hack your hosts file](https://docs.rackspace.com/support/how-to/modify-your-hosts-file/) for working without https.
67+
68+
For bying domain and configuring DNS I recommend you [Cloudflare](https://dash.cloudflare.com). You should create at least two DNS record type A:
69+
1) `your domain name` pointed to `your server IP`
70+
2) *.`your domain name` pointed to `your server IP`
6671

6772
If you run services with `docker-compose`, all service will be located on your single server. With `docker stack` (swarm) mode, you can [add addition servers](https://docs.docker.com/engine/swarm/swarm-tutorial/add-nodes/) in the same local network (the same network important for nfs volumes mounting unfortunately).
6873

@@ -88,7 +93,7 @@ docker swarm init --advertise-addr $(hostname -I | awk '{print $1}')
8893

8994
#### 3) Get this repo
9095
```
91-
git checkout https://github.com/tldr-devops/startpack.git --depth=1
96+
git clone https://github.com/tldr-devops/startpack.git --depth=1
9297
cd startpack
9398
```
9499

@@ -144,92 +149,93 @@ After entering all commands below you'll able to login into your new services by
144149
* https://strapi.your_domain
145150

146151
##### Docker Compose
152+
153+
Mandatory steps
147154
```
148155
docker-compose -f setup-compose.yml up -d
149-
docker-compose -f monitoring.yml up -d
150156
docker-compose -f databases.yml up -d
157+
```
158+
159+
from now on you can choose which services you need
160+
```
161+
docker-compose -f monitoring.yml up -d
151162
docker-compose -f registry.yml up -d
152163
docker-compose -f minio.yml up -d
153164
docker-compose -f vaultwarden.yml up -d
154165
docker-compose -f tuleap.yml up -d
155166
docker-compose -f nextcloud.yml up -d
167+
docker-compose -f gitlab.yml up -d
156168
```
157169

158-
After enabling portainer you should immediately go to portainer.{your domain} and set admin password
170+
After enabling portainer you should immediately go to portainer.your_domain and set admin password
159171
```
160172
docker-compose -f portainer.yml up -d
161173
```
162174

163-
After enabling gitlab you should immediately go to gitlab.{your domain}, login with user `root` and your `$PASSWORD`,
164-
and disable new user registration in configs.
165-
```
166-
docker-compose -f gitlab.yml up -d
167-
```
168-
169-
After enabling rocketchat you should immediately go to rocketchat.{your domain}/admin and set admin password
175+
After enabling rocketchat you should immediately go to rocketchat.your_domain/admin and set admin password
170176
```
171177
docker-compose -f rocketchat.yml up -d
172178
```
173179

174-
After enabling openproject you should immediately go to openproject.{your domain},
180+
After enabling openproject you should immediately go to openproject.your_domain,
175181
login with `admin` user and `admin` password, change it and update settings on
176-
openproject.{your domain}/admin/settings/general
182+
openproject.your_domain/admin/settings/general
177183
```
178184
docker-compose -f openproject.yml up -d
179185
```
180186

181-
After enabling nocodb you should immediately go to nocodb.{your domain} and set admin password
187+
After enabling nocodb you should immediately go to nocodb.your_domain and set admin password
182188
```
183189
docker-compose -f nocodb.yml up -d
184190
```
185191

186-
After enabling strapi you should immediately go to strapi.{your domain}/admin and set admin password
192+
After enabling strapi you should wait a minute and then go to strapi.your_domain/admin and set admin password
187193
```
188194
docker-compose -f strapi.yml up -d
189195
```
190196

191-
192197
##### Docker Swarm
198+
199+
Mandatory steps
193200
```
194201
docker stack deploy --compose-file setup-swarm.yml
195-
docker stack deploy --compose-file monitoring.yml
196202
docker stack deploy --compose-file databases.yml
203+
```
204+
205+
From now on you can choose which services you need
206+
```
207+
docker stack deploy --compose-file monitoring.yml
197208
docker stack deploy --compose-file registry.yml
198209
docker stack deploy --compose-file minio.yml
199210
docker stack deploy --compose-file vaultwarden.yml
200211
docker stack deploy --compose-file tuleap.yml
201212
docker stack deploy --compose-file nextcloud.yml
213+
docker stack deploy --compose-file gitlab.yml
202214
```
203215

204-
After enabling portainer you should immediately go to portainer.{your domain} and set admin password
216+
After enabling portainer you should immediately go to portainer.your_domain and set admin password
205217
```
206218
docker stack deploy --compose-file portainer.yml
207219
```
208220

209-
After enabling gitlab you should immediately go to gitlab.{your domain}, login with user `root` and your `$PASSWORD`,
210-
and disable new user registration in configs.
211-
```
212-
docker stack deploy --compose-file gitlab.yml
213-
```
214-
215-
After enabling rocketchat you should immediately go to rocketchat.{your domain}/admin and set admin password
221+
After enabling rocketchat you should immediately go to rocketchat.your_domain/admin and set admin password
216222
```
217223
docker stack deploy --compose-file rocketchat.yml
218224
```
219225

220-
After enabling openproject you should immediately go to openproject.{your domain},
226+
After enabling openproject you should immediately go to openproject.your_domain,
221227
login with `admin` user and `admin` password, change it and update settings on
222-
openproject.{your domain}/admin/settings/general
228+
openproject.your_domain/admin/settings/general
223229
```
224230
docker stack deploy --compose-file openproject.yml
225231
```
226232

227-
After enabling nocodb you should immediately go to nocodb.{your domain} and set admin password
233+
After enabling nocodb you should immediately go to nocodb.your_domain and set admin password
228234
```
229235
docker stack deploy --compose-file nocodb.yml
230236
```
231237

232-
After enabling strapi you should immediately go to strapi.{your domain}/admin and set admin password
238+
After enabling strapi you should immediately go to strapi.your_domain/admin and set admin password
233239
```
234240
docker stack deploy --compose-file strapi.yml
235241
```

configs/telegraf-node.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#pid_tag = true
4747

4848
[[inputs.docker]]
49-
endpoint = "unix:///hostfs/var/run/docker.sock"
49+
endpoint = "unix:///hostfs/run/docker.sock"
5050
source_tag = true
5151
docker_label_include = ['source', 'container_name', 'container_status', 'host']
5252
docker_label_exclude = ['*']

databases.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ x-service-deploy: &service-deploy
3232
replicas: 1
3333
placement:
3434
constraints:
35-
- node.role == manager
35+
- node.hostname == ${HOSTNAME?Variable HOSTNAME not set}
3636

3737
services:
3838
# https://hub.docker.com/_/adminer
@@ -43,6 +43,10 @@ services:
4343
<<: *service-deploy
4444
<<: *adminer-labels
4545
placement: {}
46+
resources:
47+
reservations:
48+
cpus: '0.01'
49+
memory: 5M
4650
<<: *adminer-labels
4751
<<: *service
4852

@@ -52,6 +56,10 @@ services:
5256
image: mariadb:10.7
5357
deploy:
5458
<<: *service-deploy
59+
resources:
60+
reservations:
61+
cpus: '0.01'
62+
memory: 70M
5563
<<: *service
5664
environment:
5765
MARIADB_ROOT_PASSWORD: ${SQL_ROOT_PASSWORD?Variable SQL_ROOT_PASSWORD not set}
@@ -66,6 +74,10 @@ services:
6674
image: postgres:14
6775
deploy:
6876
<<: *service-deploy
77+
resources:
78+
reservations:
79+
cpus: '0.01'
80+
memory: 50M
6981
<<: *service
7082
environment:
7183
POSTGRES_PASSWORD: ${SQL_ROOT_PASSWORD?Variable SQL_ROOT_PASSWORD not set}

gitlab.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ services:
3838
deploy:
3939
mode: replicated
4040
replicas: 1
41+
resources:
42+
reservations:
43+
cpus: '0.10'
44+
memory: 2900M
4145
<<: *gitlab-labels
4246
<<: *gitlab-labels
4347
<<: *service
@@ -100,8 +104,6 @@ volumes:
100104
external: True
101105
gitlab-logs:
102106
external: True
103-
gitlab-runner-configs:
104-
external: True
105107

106108
networks:
107109
gitlab:

minio.yml

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ services:
4343
deploy:
4444
mode: replicated
4545
replicas: 1
46+
resources:
47+
reservations:
48+
cpus: '0.03'
49+
memory: 70M
4650
<<: *minio-labels
4751
<<: *minio-labels
4852
<<: *service

monitoring.yml

+48-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ services:
7070
deploy:
7171
mode: replicated
7272
replicas: 1
73+
resources:
74+
reservations:
75+
cpus: '0.01'
76+
memory: 100M
7377
placement:
7478
constraints:
75-
- node.role == manager
79+
- node.hostname == ${HOSTNAME?Variable HOSTNAME not set}
7680
<<: *victoriametrics-labels
7781
<<: *victoriametrics-labels
7882
<<: *service
@@ -91,6 +95,13 @@ services:
9195
vmagent:
9296
container_name: vmagent
9397
image: victoriametrics/vmagent
98+
deploy:
99+
mode: replicated
100+
replicas: 1
101+
resources:
102+
reservations:
103+
cpus: '0.01'
104+
memory: 50M
94105
<<: *service
95106
volumes:
96107
- victoriametrics-configs:/etc/victoriametrics
@@ -102,6 +113,13 @@ services:
102113
vmalert:
103114
container_name: vmalert
104115
image: victoriametrics/vmalert
116+
deploy:
117+
mode: replicated
118+
replicas: 1
119+
resources:
120+
reservations:
121+
cpus: '0.01'
122+
memory: 50M
105123
<<: *service
106124
volumes:
107125
- victoriametrics-configs:/etc/victoriametrics
@@ -127,6 +145,10 @@ services:
127145
deploy:
128146
mode: replicated
129147
replicas: 1
148+
resources:
149+
reservations:
150+
cpus: '0.01'
151+
memory: 50M
130152
<<: *grafana-labels
131153
<<: *grafana-labels
132154
<<: *service
@@ -157,9 +179,13 @@ services:
157179
deploy:
158180
mode: replicated
159181
replicas: 1
182+
resources:
183+
reservations:
184+
cpus: '0.01'
185+
memory: 130M
160186
placement:
161187
constraints:
162-
- node.role == manager
188+
- node.hostname == ${HOSTNAME?Variable HOSTNAME not set}
163189
<<: *influxdb-labels
164190
<<: *influxdb-labels
165191
<<: *service
@@ -184,6 +210,10 @@ services:
184210
image: telegraf
185211
deploy:
186212
mode: global
213+
resources:
214+
reservations:
215+
cpus: '0.01'
216+
memory: 50M
187217
<<: *service
188218
volumes:
189219
- telegraf-configs:/etc/telegraf
@@ -209,6 +239,10 @@ services:
209239
deploy:
210240
mode: replicated
211241
replicas: 1
242+
resources:
243+
reservations:
244+
cpus: '0.01'
245+
memory: 50M
212246
<<: *service
213247
volumes:
214248
- telegraf-configs:/etc/telegraf
@@ -318,6 +352,18 @@ networks:
318352
taiga:
319353
name: taiga
320354
<<: *network
355+
rocketchat:
356+
name: rocketchat
357+
<<: *network
358+
rocketchat:
359+
name: rocketchat
360+
<<: *network
361+
vaultwarden:
362+
name: vaultwarden
363+
<<: *network
364+
twake:
365+
name: twake
366+
<<: *network
321367
tuleap:
322368
name: tuleap
323369
<<: *network

nextcloud.yml

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ services:
3434
deploy:
3535
mode: replicated
3636
replicas: 1
37+
resources:
38+
reservations:
39+
cpus: '0.01'
40+
memory: 50M
3741
<<: *nextcloud-labels
3842
<<: *nextcloud-labels
3943
<<: *service

nocodb.yml

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ services:
3434
deploy:
3535
mode: replicated
3636
replicas: 1
37+
resources:
38+
reservations:
39+
cpus: '0.01'
40+
memory: 90M
3741
<<: *nocodb-labels
3842
<<: *nocodb-labels
3943
<<: *service

openproject.yml

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ services:
3434
deploy:
3535
mode: replicated
3636
replicas: 1
37+
resources:
38+
reservations:
39+
cpus: '0.01'
40+
memory: 1400M
3741
<<: *openproject-labels
3842
<<: *openproject-labels
3943
<<: *service

0 commit comments

Comments
 (0)