This repository has been archived by the owner on Dec 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
multi-site.example.yaml
81 lines (77 loc) · 2.1 KB
/
multi-site.example.yaml
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
version: '2'
services:
caddy:
# Only 1 caddy container is needed even with multi sites
image: rothgar/rpi-caddy:v0.9.1
volumes:
# Put multiple sites in their own subfolders
# e.g. .data/wp/www1 and data/wp/www2
# Update Caddyfile to reflect the correct root
- "./.data/wp:/srv"
depends_on:
- mysql1
- mysql2
- php
ports:
- "80:80"
- "443:443"
restart: always
php:
image: rothgar/rpi-php:5.6
#build: php
links:
# make sure you change wp-config for each mysql hostname
- mysql1:mysql1
- mysql2:mysql2
volumes:
- "./.data/wp:/srv"
restart: always
mysql1:
image: rothgar/rpi-mysql:5.5
#build: mysql
volumes:
# notice the db folders are under site specific folders
- "./.data/db/site1:/var/lib/mysql"
- "./.data/backup/site1:/docker-entrypoint-initdb.d"
restart: always
environment:
# Change for your existing database
MYSQL_ROOT_PASSWORD: wordpress
# below values should match wp-config
MYSQL_DATABASE: blog
MYSQL_USER: wordpress
MYSQL_PASSWORD: PASSWORD!!!
mysql2:
image: rothgar/rpi-mysql:5.5
#build: mysql
volumes:
- "./.data/db/site2:/var/lib/mysql"
- "./.data/backup/site2:/docker-entrypoint-initdb.d"
restart: always
environment:
# Change for your existing database
MYSQL_ROOT_PASSWORD: wordpress
# below values should match wp-config
MYSQL_DATABASE: blog
MYSQL_USER: wordpress
MYSQL_PASSWORD: PASSWORD!!!
# Use these images for dynamic DDNS updates
# For Google domains use http://j.mp/2bRNYET
# Make sure you update WWW and @ DNS entries
# Make sure you have a new inadyn container for each site
#
# inadyn1:
# image: rothgar/rpi-inadyn:1.99.15
# environment:
# SYSTEM: default@domains.google.com
# USERNAME: UUUUU
# PASSWORD: PPPPP
# ALIAS: example.com
#
# inadyn_www1:
# image: rothgar/rpi-inadyn:1.99.15
# environment:
# SYSTEM: default@domains.google.com
# USERNAME: UUUUU
# PASSWORD: PPPPP
# ALIAS: www.example.com