-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate
More file actions
45 lines (40 loc) · 1.47 KB
/
create
File metadata and controls
45 lines (40 loc) · 1.47 KB
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
# create db network
docker network create internal
## create persistent storage directory
mkdir -p /storage/{db,www}
## traefik
docker run -d \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $PWD/traefik.toml:/traefik.toml \
-p 80:80 \
-l traefik.frontend.rule=Host:lb01.remote-lab.net \
-l traefik.frontend.redirect.regex='^http://lb01.remote-lab.net/(.*)' \
-l traefik.frontend.redirect.replacement='https://lb01.remote-lab.net/$1' \
-l traefik.port=8080 \
--network internal \
--name traefik \
traefik:latest --docker
## mariadb
docker run --name mariadb --restart always -e MYSQL_ROOT_PASSWORD=$(openssl rand -hex 10) -v /storage/db:/var/lib/mysql --network internal -d mariadb:latest
## wordpress01
docker run --name vidomaintenance.ca \
--restart always \
--label="traefik.backend=vidomaintenance.ca" \
--label="traefik.frontend.rule=Host:vidomaintenance.ca,www.vidomaintenance.ca" \
--label="traefik.docker.network=proxy" \
--label="traefik.port=80" \
--network internal \
--link mariadb:db \
-v /storage/www/vidomaintenance.ca:/var/www/html \
-d wordpress:latest
docker run --name mydailybag.com \
--restart always \
--label="traefik.backend=mydailybag.com" \
--label="traefik.frontend.rule=Host:mydailybag.com,www.mydailybag.com" \
--label="traefik.docker.network=proxy" \
--label="traefik.port=80" \
--network internal \
--link mariadb:db \
-v /storage/www/mydailybag.com:/var/www/html \
-d wordpress:latest