-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.sh
136 lines (122 loc) · 4.09 KB
/
commands.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
docker rm -f $(docker ps -aq)
docker network prune -f
docker volume prune -f
docker network create traefik-network
docker run -d \
--name=traefik \
--restart unless-stopped \
-p 80:80 \
-p 443:443 \
-p 8090:8090 \
-p 8091:8091 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd)/traefik.toml:/etc/traefik/traefik.toml \
-v $(pwd)/dynamic.toml:/etc/traefik/dynamic/dynamic.toml \
-v $(pwd)/certs:/etc/traefik/certs \
--network=traefik-network \
--label "traefik.enable=true" \
--label "traefik.http.routers.traefik.rule=Host(`traefik.local`)" \
--label "traefik.http.routers.traefik.entrypoints=websecure" \
--label "traefik.http.routers.traefik.tls=true" \
--label "traefik.http.routers.traefik.service=api@internal" \
--label "traefik.http.routers.traefik.tls.certresolver=le" \
traefik:v2.5
docker run -d \
--name=mariadb-server \
--restart unless-stopped \
-e MYSQL_ROOT_PASSWORD='rootpassword' \
--network=traefik-network \
mariadb:10.5
docker run -d \
--name=zabbix-server-mysql \
--restart unless-stopped \
-e DB_SERVER_HOST="mariadb-server" \
-e MYSQL_DATABASE='zabbix' \
-e MYSQL_USER='zabbix' \
-e MYSQL_PASSWORD='zabbix' \
-e MYSQL_ROOT_PASSWORD='rootpassword' \
--network=traefik-network \
-p 10051:10051 \
zabbix/zabbix-server-mysql:alpine-7.0-latest
docker run -d \
--name=zabbix-web-nginx-mysql \
--restart unless-stopped \
-e ZBX_SERVER_HOST="zabbix-server-mysql" \
-e DB_SERVER_HOST="mariadb-server" \
-e MYSQL_DATABASE='zabbix' \
-e MYSQL_USER='zabbix' \
-e MYSQL_PASSWORD='zabbix' \
-e MYSQL_ROOT_PASSWORD='rootpassword' \
--network=traefik-network \
-p 8082:8080 \
--label "traefik.enable=true" \
--label 'traefik.http.routers.zabbix.rule=Host(`zabbix.local`)' \
--label 'traefik.http.routers.zabbix.entrypoints=websecure' \
--label 'traefik.http.routers.zabbix.tls=true' \
zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest
docker run -d \
--name=zabbix-java-gateway \
--restart unless-stopped \
--network=traefik-network \
-p 10052:10052 \
zabbix/zabbix-java-gateway:alpine-7.0-latest
docker run -d \
--name=glpi \
--restart unless-stopped \
-e DB_HOST=mariadb-server \
-e DB_USER=glpi_user \
-e DB_PASSWORD=glpi_password \
-e DB_NAME=glpidb \
-e MYSQL_ROOT_PASSWORD='rootpassword' \
--network=traefik-network \
-p 8081:80 \
--label "traefik.enable=true" \
--label 'traefik.http.routers.glpi.rule=Host(`glpi.local`)' \
--label 'traefik.http.routers.glpi.entrypoints=websecure' \
--label 'traefik.http.routers.glpi.tls=true' \
diouxx/glpi
docker run -d \
--name=portainer \
--restart=always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
--network=traefik-network \
-p 9002:9000 \
-p 9443:9443 \
--label 'traefik.enable=true' \
--label 'traefik.http.routers.portainer.rule=Host("portainer.local")' \
--label 'traefik.http.routers.portainer.entrypoints=websecure' \
--label 'traefik.http.routers.portainer.tls=true' \
portainer/portainer-ce
docker build -t my-apache2-webserver .
docker run -d \
--name=apache2-webserver \
--restart unless-stopped \
-p 8083:80 \
--network=traefik-network \
--label "traefik.enable=true" \
--label 'traefik.http.routers.apache2.rule=Host(`tools.local`)' \
--label 'traefik.http.routers.apache2.entrypoints=websecure' \
--label 'traefik.http.routers.apache2.tls=true' \
my-apache2-webserver
docker run -d \
--name=prometheus \
--restart unless-stopped \
-p 9090:9090 \
--network=traefik-network \
--label "traefik.enable=true" \
--label 'traefik.http.routers.prometheus.rule=Host(`prometheus.local`)' \
--label 'traefik.http.routers.prometheus.entrypoints=websecure' \
--label 'traefik.http.routers.prometheus.tls=true' \
prom/prometheus
docker run -d \
--name=grafana \
--restart unless-stopped \
-p 3000:3000 \
--network=traefik-network \
--label "traefik.enable=true" \
--label 'traefik.http.routers.grafana.rule=Host(`grafana.local`)' \
--label 'traefik.http.routers.grafana.entrypoints=websecure' \
--label 'traefik.http.routers.grafana.tls=true' \
grafana/grafana