-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
75 lines (72 loc) · 2.42 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
# This file provides a local environment that is *separate* and *isolated* from
# the one provided by docker-compose.yml. This allows you to have one
# environment for automated tests and another for user testing / browsing.
#
# Edit your /etc/hosts file to add an entry for wpgraphql.example, e.g.:
#
# 127.0.0.1 localhost wpgraphql.example
#
# Next, start the environment. The `-f` flag is necessary to restrict your
# commands to this docker-compose file:
#
# docker-compose -f docker-compose.dev.yml up -d
#
# After about 30 seconds, you will be able to access http://wpgraphql.example
# in your browser.
#
# Stop the environment with:
#
# docker-compose -f docker-compose.dev.yml stop
#
# NOTE: If you experience issues starting the environment, make sure you're either logged out of Docker completely
# or are logged in with proper credentials. If you were logged in and your credentials are invalid, the setup will
# fail. You can logout of Docker with the following command:
#
# docker logout
#
# And login to Docker with the following command:
#
# docker login
version: "3"
services:
wpgraphql:
image: "wordpress:${WP_VERSION:-4.9.8}-php${PHP_VERSION:-7.2}-apache"
depends_on:
- mysql
environment:
VIRTUAL_HOST: "wpgraphql.example"
WORDPRESS_DB_HOST: "mysql"
WORDPRESS_DB_NAME: "wpgraphql"
WORDPRESS_DB_PASSWORD: "testing"
WORDPRESS_DB_USER: "root"
WORDPRESS_DEBUG: 1
WORDPRESS_CONFIG_EXTRA: |
define( 'WP_DEFAULT_THEME', 'dev-theme' );
networks:
- "dev"
volumes:
- "./client/build:/var/www/html/wp-content/themes/wpgraphql-theme"
- "./client/public:/var/www/html/wp-content/themes/dev-theme"
- "./server/vendor/wp-graphql/wp-graphiql:/var/www/html/wp-content/plugins/wp-graphiql"
- "./server/vendor/wp-graphql/wp-graphql:/var/www/html/wp-content/plugins/wp-graphql"
- "./server/src:/var/www/html/wp-content/plugins/wpgraphql-settings"
- "./server/vendor/wp-graphql/wp-graphql-jwt-authentication:/var/www/html/wp-content/plugins/wp-graphql-jwt-authentication"
mysql:
image: "mariadb:10.2"
environment:
MYSQL_DATABASE: "wpgraphql"
MYSQL_ROOT_PASSWORD: "testing"
networks:
- "dev"
proxy:
image: "jwilder/nginx-proxy:alpine"
ports:
- "8000:80"
networks:
dev:
aliases:
- "wpgraphql.example"
volumes:
- "/var/run/docker.sock:/tmp/docker.sock:ro"
networks:
dev: {}