forked from luangjokaj/wordpressify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
53 lines (53 loc) · 1.26 KB
/
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
44
45
46
47
48
49
50
51
52
53
version: "3.8"
services:
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_DATABASE: "${DB_NAME}"
expose:
- "3306"
networks:
- "default-network"
volumes:
- "persistent_db:/var/lib/mysql"
wordpress:
user: "${WPFY_UID}:${WPFY_GID}"
build: .
expose:
- "9000"
environment:
WORDPRESS_DB_HOST: "${DB_HOST}:${DB_PORT}"
WORDPRESS_DB_USER: "${DB_USER}"
WORDPRESS_DB_PASSWORD: "${DB_PASSWORD}"
WORDPRESS_DB_NAME: "${DB_NAME}"
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define( 'DISABLE_WP_CRON', true );
define( 'WP_DEBUG_LOG', '/var/xdebug/wp-errors.log' );
define( 'FS_DIRECT', true );
networks:
- "default-network"
volumes:
- "./build/wordpress:/var/www/html"
- "./xdebug:/var/xdebug"
- "./config/php.ini:/usr/local/etc/php/conf.d/overrides.ini"
depends_on:
- db
server:
image: nginx:latest
networks:
- "default-network"
ports:
- "${SERVER_PORT}:80"
volumes:
- "./build/wordpress:/var/www/html"
- "./config/nginx:/etc/nginx"
depends_on:
- "wordpress"
- "db"
networks:
default-network:
driver: bridge
volumes:
persistent_db: