forked from northosts/wuxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (48 loc) · 1.61 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
version: '2.1'
services:
mysql.wuxt:
container_name: ${WUXT_MYSQL_CONTAINER:-mysql.wuxt}
image: mysql:5.7
volumes:
- ./_db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: dev
networks:
- default
wp.wuxt:
container_name: ${WUXT_WP_CONTAINER:-wp.wuxt}
image: wordpress:5.2.2-php7.2-apache
volumes:
- ./wp-content:/var/www/html/wp-content:rw,cached
expose:
- '${WUXT_PORT_BACKEND:-3080}'
ports:
- '${WUXT_PORT_BACKEND:-3080}:80'
environment:
WORDPRESS_DB_HOST: ${WUXT_MYSQL_CONTAINER:-mysql.wuxt}:3306
WORDPRESS_DB_NAME: wuxt
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: dev
WUXT_PORT_BACKEND: ${WUXT_PORT_BACKEND:-3080}
WORDPRESS_CONFIG_EXTRA: |
define('WP_SITEURL', 'http://localhost:${WUXT_PORT_BACKEND:-3080}' );
define('WP_HOME', 'http://localhost:${WUXT_PORT_BACKEND:-3080}' );
networks:
- default
front.wuxt:
container_name: ${WUXT_NUXT_CONTAINER:-front.wuxt}
image: node:11-slim
working_dir: '/var/www/app'
environment:
- HOST=0.0.0.0
- WUXT_WP_CONTAINER=${WUXT_WP_CONTAINER:-wp.wuxt}
- WUXT_PORT_BACKEND=${WUXT_PORT_BACKEND:-3080}
ports:
- '${WUXT_PORT_FRONTEND-3000}:3000'
volumes:
- ./nuxt:/var/www/app
command: bash -c "yarn install && WUXT_PORT_BACKEND=${WUXT_PORT_BACKEND:-3080} yarn dev"
networks:
- default
networks:
default: