-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (36 loc) · 885 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
version: "3"
services:
nginx:
image: nginx:alpine
env_file:
- .env
volumes:
- ./etc/nginx/templates:/etc/nginx/templates
- ./opt/wordpress:/var/www/html
ports:
- "127.0.0.1:8080:80"
restart: unless-stopped
db:
image: mysql:5.7
volumes:
- ./opt/mysql:/var/lib/mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
wordpress:
depends_on:
- db
image: wordpress:fpm-alpine
volumes:
- ./opt/wordpress:/var/www/html
ports:
- "127.0.0.1:8081:80"
restart: unless-stopped
environment:
WORDPRESS_DB_HOST: $DB_HOST
WORDPRESS_DB_USER: $DB_USER
WORDPRESS_DB_PASSWORD: $DB_PASSWORD
WORDPRESS_DB_NAME: $DB_NAME