forked from opendevshop/devshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
89 lines (77 loc) · 3.79 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
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '2.2'
# This compose file is just an example. Create your own to launch your own Aegir cluster
services:
devshop:
# If the image listed here does't exist yet locally (even if you use a docker hub image),
# `docker-compose up` will automatically BUILD it and tag it with this name.
#
# As soon as the image listed here DOES exists locally, `docker-compose up`
# only launch the container. It will only rebuild it if you use --build.
#
# This can cause confusion. If "image: devshop/server:latest", try:
# $ docker-compose up
#
# 1. Runs a docker build FROM devshop/server:latest (and pulls it in the process.)
# 2. If it completes, you will have a NEW devshop/server:latest that is DIFFERENT from the remote.
# 3. It will launch this container when done building.
# 4. The next time you run `docker-compose up` it will use the same image (devshop/server:latest),
# only recreating the CONTAINER if any docker-compose.yml changed,
# and only rebuilding the IMAGE if the `--build` option is used. (or `docker-compose build` is used)
#
# The problem arises if you are developing, and the build fails.
# Even if your build fails, docker downloaded the FROM image in the background.
#
# If this image name matches the "image" string below, the next `docker-compose up`
# call will see that you have a local copy and will launch that INSTEAD of building it new.
#
# By using the non-docker-hub image "devshop/server:local" in this docker-compose file, we force the
# the developer to finish that first build before any container can be launched.
#
image: ${DEVSHOP_DOCKER_IMAGE:-devshop/server:latest}
command: ${DOCKER_COMMAND:-env}
ports:
- "80:80"
- "2222:22"
hostname: devshop.local.computer
extra_hosts:
- "drpl8.testenv.devshop.local.computer:127.0.0.1"
environment:
- ANSIBLE_TAGS
- ANSIBLE_EXTRA_VARS
- ANSIBLE_VERBOSITY
- ANSIBLE_PLAYBOOK=${ANSIBLE_PLAYBOOK:-/usr/share/devshop/roles/devshop.server/play.yml}
- ANSIBLE_SKIP_TAGS
- ANSIBLE_PLAYBOOK_COMMAND_OPTIONS
- ANSIBLE_CONFIG
- FROM_IMAGE
- OS_VERSION
- DEVSHOP_DOCKER_COMMAND_RUN
- DOCKER_COMMAND_POST=${DOCKER_COMMAND_POST:-devshop login}
- DOCKER_COMMAND_POST
# Change to use a different database host.
- DATABASE_HOST=localhost
- XDEBUG_CONFIG="remote_host=172.17.0.1 idekey=PHPSTORM"
- PHP_IDE_CONFIG="serverName=devshop.local.computer"
# To allow the devmaster container to launch other docker containers, we need the host's path to aegir home directory.
- HOST_AEGIR_HOME=/home/jon/Projects/devshop/aegir-home
# Add additional files you would like to output in the container logs here, separated by a space.
# - DEVSHOP_ENTRYPOINT_LOG_FILES="/var/log/aegir/*"
# For development, test output will be saved to the sites "files" folder so you can click the results.
# If you want to save test error output to a different folder change this variable.
# For CI, set this to the folder that will be saved as artifacts.
- DEVSHOP_TESTS_ARTIFACTS_PATH=
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /var/lib/mysql
- /var/logs/aegir
# Resource allocation.
# 4GB, 2CPUs is a good minimum.
# mem_limit is a hard upper limit for the container.
# If using linux, make sure this is below your system's idle free memory or your desktop will slow down.
mem_limit: 10g
# mem_reservation is a minimum that your system will reserve for the container.
# DevShop needs about 4GB to provide a good user experience.
mem_reservation: 4g
# Restrict the containers to only use the first 2 CPUs
cpuset: 0,1