-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (40 loc) · 929 Bytes
/
docker-compose.yml
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
version: "3.8"
networks:
baloot:
external: True
name: baloot
services:
db:
image: mariadb:latest
restart: always
deploy:
placement:
constraints:
- node.labels.type == databases
- node.labels.servernumber == 1
environment:
- MYSQL_ROOT_PASSWORD=your_password
volumes:
- /mnt/databases:/var/lib/mysql
- "/mnt/databases_conf/50-server.cnf:/etc/mysql/mariadb.conf.d/50-server.cnf:ro"
networks:
baloot:
web:
hostname: web
image: wordpress:latest
ports:
- "8080:80"
deploy:
placement:
constraints:
- node.labels.type == swarm
- node.labels.servernumber == 1
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress
networks:
baloot:
volumes:
- /mnt/wp:/var/www/html/