-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
76 lines (70 loc) · 2.68 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
version: '3'
services:
mysql.nuxtpress:
container_name: ${NUXTPRESS_MYSQL_CONTAINER:-mysql.nuxtpress}
image: mariadb:10.4.12
restart: unless-stopped
volumes:
- ./_db:/var/lib/mysql:delegated
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: ${NUXTPRESS_WP_DB_NAME:-nuxtpress}
MYSQL_USER: ${NUXTPRESS_WP_DB_USER:-dev}
MYSQL_PASSWORD: ${NUXTPRESS_WP_DB_PASSWORD:-dev}
networks:
- default
wp.nuxtpress:
container_name: ${NUXTPRESS_WP_CONTAINER:-wp.nuxtpress}
image: wordpress:6.1.1-php8.2-apache
restart: unless-stopped
depends_on:
- ${NUXTPRESS_MYSQL_CONTAINER:-mysql.nuxtpress}
volumes:
- ./wordpress/.htaccess:/var/www/html/.htaccess:delegated
- ./wordpress/wp-content:/var/www/html/wp-content:delegated
expose:
- '${NUXTPRESS_WP_PORT:-3080}'
ports:
- '${NUXTPRESS_WP_PORT:-3080}:80'
environment:
NUXTPRESS_WP_PORT: ${NUXTPRESS_WP_PORT:-3080}
WORDPRESS_DB_HOST: ${NUXTPRESS_WP_DB_HOST:-mysql.nuxtpress}
WORDPRESS_DB_USER: ${NUXTPRESS_WP_DB_USER:-dev}
WORDPRESS_DB_PASSWORD: ${NUXTPRESS_WP_DB_PASSWORD:-dev}
WORDPRESS_DB_NAME: ${NUXTPRESS_WP_DB_NAME:-nuxtpress}
WORDPRESS_TABLE_PREFIX: ${NUXTPRESS_WP_TABLE_PREFIX:-np_}
WORDPRESS_DEBUG: ${NUXTPRESS_WP_DEBUG:-1}
WORDPRESS_CONFIG_EXTRA: |
define( 'WP_HEADLESS_URL', '${NUXTPRESS_URL_FRONTEND:-http://localhost:3000}' );
define( 'WP_SITEURL', 'http://localhost:${NUXTPRESS_WP_PORT:-3080}' );
define( 'WP_HOME', 'http://localhost:${NUXTPRESS_WP_PORT:-3080}' );
define( 'DISALLOW_FILE_EDIT', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
include( ABSPATH . '.env.php' );
networks:
- default
# This is turned off by default as Nuxt spins up a development server with ease which is MUCH faster.
# front.nuxtpress:
# container_name: ${NUXTPRESS_NUXT_CONTAINER:-front.nuxtpress}
# image: node:11-slim
# working_dir: '/var/www/app'
# environment:
# - HOST=0.0.0.0
# - NUXTPRESS_WP_CONTAINER=${NUXTPRESS_WP_CONTAINER:-wp.nuxtpress}
# - NUXTPRESS_WP_URL=${NUXTPRESS_WP_URL:-http://localhost:3080}
# - NUXTPRESS_WP_PORT=${NUXTPRESS_WP_PORT:-3080}
# ports:
# - '${NUXTPRESS_PORT_FRONTEND:-3000}:3000'
# - '${NUXTPRESS_PORT_STORYBOOK:-6006}:6006'
# volumes:
# - ./nuxt:/var/www/app:delegated
# command: bash -c "yarn install && NUXTPRESS_WP_PORT=${NUXTPRESS_WP_PORT:-3080} yarn dev"
# networks:
# - default
volumes:
_db:
.htaccess:
wp-content:
networks:
default: