-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose-nginx-local.yml
executable file
·50 lines (49 loc) · 1.26 KB
/
docker-compose-nginx-local.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
44
45
46
47
48
49
50
version: '3'
# Rename to docker-compose.yml to run locally.
services:
wordpress:
image: wordpress:5.4.1-php7.3-fpm
restart: always
volumes:
- ./wordpress:/var/www/html:cached # Full wordpress project
- ./wordpress/wp-config.php:/var/www/html/wp-config.php:cached # wp-config
depends_on:
- db
db:
image: mysql:latest
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_DATABASE: localdb
MYSQL_USER: user
MYSQL_PASSWORD: pass
MYSQL_RANDOM_ROOT_PASSWORD: '1'
ports:
- 3306:3306
volumes:
- ./db/seed:/docker-entrypoint-initdb.d:cached
- ./db/data:/var/lib/mysql:cached
pma:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: db
PMA_PORT: 3306
MYSQL_ROOT_PASSWORD: pass
ports:
- 8080:80
depends_on:
- db
nginx:
image: nginx:latest
ports:
- '80:80'
- '443:443'
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:cached
- ./logs/nginx:/var/log/nginx:cached
- ./wordpress:/var/www/html:cached
- ./wordpress/wp-config.php:/var/www/html/wp-config.php:cached
- ./certs:/certs
depends_on:
- wordpress
restart: always