forked from serundeputy/docker-drupal-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
53 lines (50 loc) · 1.46 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
varnish:
# A public image with a Varnish install
image: jacksoncage/varnish
# Pass backend connections to the linked "web" container
environment:
VARNISH_BACKEND_IP: web
# Set up the internal link
links:
- web:web
# Expose port 8100 on the host.
ports:
- 8100:80
web:
# A base image with Apache/PHP (https://registry.hub.docker.com/u/rbayliss/php/)
image: rbayliss/php:5.5
volumes:
# Mount the local drupal directory in the container
- ./drupal:/srv
# Mount our install shell script
- ./install.sh:/install.sh
ports:
# Expose port 8101 on the host. Useful for debugging w/o Varnish
- 8101:80
links:
# Link the DB container:
- db:db
# Link the Solr container:
- solr:solr
db:
# A docker official base image for MySQL
image: mysql:5.6
# Default environment variables used to set up the container on the first run:
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: drupal
MYSQL_USER: drupal
MYSQL_PASSWORD: password
volumes:
# Use a "volume" to prevent data from disappearing when the container is
# restarted.
- /var/lib/mysql
# In a production setting, you'd use a locally mounted volume for extra
# persistence. This would mount ./data to /var/lib/mysql inside the container:
# - ./data:/var/lib/mysql
solr:
# Example of extending a container with our own Dockerfile
build: solr/
# Expose port 8983 directly on the host
ports:
- 8983:8983