-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (41 loc) · 844 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (41 loc) · 844 Bytes
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.4"
services:
wordpress:
image: wordpress:4-php7.1-fpm-alpine
ports:
- 9000:9000
volumes:
- ./wordpress:/var/www/html
environment:
- WORDPRESS_DB_HOST=db:3306
- WORDPRESS_DB_USER=user
- WORDPRESS_DB_PASSWORD=example
- WORDPRESS_DB_NAME=wordpress
networks:
- wordpress
- nginx
# database service
db:
image: mariadb:latest
ports:
- 3307:3306
environment:
- MYSQL_ROOT_PASSWORD=supersecurepassword
- MYSQL_USER=user
- MYSQL_PASSWORD=example
- MYSQL_DATABASE=wordpress
networks:
- wordpress
# nginx service
nginx:
image: nginx:latest
ports:
- 80:80
volumes:
- ./nginx:/etc/nginx/conf.d/
- ./wordpress:/var/www/html
networks:
- nginx
networks:
wordpress:
nginx: