Created
July 31, 2017 13:10
-
-
Save ianmjones/cb8a44aa9ad8fe23445fa08bf6890027 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
# | |
# Base services. | |
# | |
data: | |
image: deliciousbrains/data@sha256:6fbc27c3c84c0e4d40b261e2c8246a2065a96916481ab475facfcd6e81548f31 | |
labels: | |
com.deliciousbrains.service: "data" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
command: ["echo", "Data Container"] | |
repo: | |
image: deliciousbrains/data@sha256:6fbc27c3c84c0e4d40b261e2c8246a2065a96916481ab475facfcd6e81548f31 | |
labels: | |
com.deliciousbrains.service: "repo" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- data | |
volumes: | |
- ../:/mnt/build | |
command: ["echo", "Repo Data Container"] | |
# | |
# Run acceptance tests (eventually). | |
# | |
acceptance-tests-base: | |
image: deliciousbrains/php-cli@sha256:c2bf45814327891aa8a9a72fb3cd1da9c04dde28f81588a0fccaf570c7a9ca7c | |
labels: | |
com.deliciousbrains.service: "acceptance-tests-base" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
entrypoint: ["/tmp/run-acceptance-tests.sh"] | |
acceptance-tests: | |
extends: | |
service: acceptance-tests-base | |
labels: | |
com.deliciousbrains.service: "acceptance-tests" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- repo | |
volumes: | |
- ./php-cli/run-acceptance-tests.sh:/tmp/run-acceptance-tests.sh | |
depends_on: | |
- plugin-build | |
links: | |
- web-server | |
- selenium-server-chrome | |
acceptance-tests-phantomjs: | |
extends: | |
service: acceptance-tests-base | |
labels: | |
com.deliciousbrains.service: "acceptance-tests-phantomjs" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- repo | |
volumes: | |
- ./php-cli/run-acceptance-tests.sh:/tmp/run-acceptance-tests.sh | |
depends_on: | |
- plugin-build | |
links: | |
- web-server | |
- phantomjs-server | |
acceptance-tests-chrome: | |
extends: | |
service: acceptance-tests-base | |
labels: | |
com.deliciousbrains.service: "acceptance-tests-chrome" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- repo | |
volumes: | |
- ./php-cli/run-acceptance-tests.sh:/tmp/run-acceptance-tests.sh | |
depends_on: | |
- plugin-build | |
links: | |
- web-server | |
- selenium-server-chrome | |
acceptance-tests-firefox: | |
extends: | |
service: acceptance-tests-base | |
labels: | |
com.deliciousbrains.service: "acceptance-tests-firefox" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- repo | |
volumes: | |
- ./php-cli/run-acceptance-tests.sh:/tmp/run-acceptance-tests.sh | |
depends_on: | |
- plugin-build | |
links: | |
- web-server | |
- selenium-server-firefox | |
phantomjs-server: | |
image: wernight/phantomjs | |
labels: | |
com.deliciousbrains.service: "phantomjs-server" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
expose: | |
- "8910" | |
links: | |
- web-server | |
command: ["phantomjs", "--webdriver=8910"] | |
selenium-server-chrome: | |
image: selenium/standalone-chrome | |
labels: | |
com.deliciousbrains.service: "selenium-server-chrome" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
expose: | |
- "4444" | |
links: | |
- web-server | |
selenium-server-firefox: | |
image: selenium/standalone-firefox | |
labels: | |
com.deliciousbrains.service: "selenium-server-firefox" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
expose: | |
- "4444" | |
links: | |
- web-server | |
# | |
# Plugins Build Setup. | |
# | |
plugin-build: | |
image: deliciousbrains/php-cli@sha256:c2bf45814327891aa8a9a72fb3cd1da9c04dde28f81588a0fccaf570c7a9ca7c | |
labels: | |
com.deliciousbrains.service: "plugin-build" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- repo | |
volumes: | |
- ./php-cli/build-plugins.sh:/tmp/build-plugins.sh | |
entrypoint: ["/tmp/build-plugins.sh", "-c"] | |
# | |
# Web Server Setup. | |
# | |
web-data: | |
image: deliciousbrains/data@sha256:6fbc27c3c84c0e4d40b261e2c8246a2065a96916481ab475facfcd6e81548f31 | |
labels: | |
com.deliciousbrains.service: "web-data" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- data | |
volumes: | |
- ./web-server/html/phpinfo.php:/var/www/html/phpinfo.php | |
- ./web-server/html/index.html:/var/www/html/index.html | |
- ./web-server/html/db-test.php:/var/www/html/db-test.php | |
command: ["echo", "Web Data Container"] | |
web-server: | |
image: nginx:1.11-alpine | |
labels: | |
com.deliciousbrains.service: "web-server" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- web-data | |
volumes: | |
- ./web-server/nginx/server_common.conf:/etc/nginx/server_common.conf | |
- ./web-server/nginx/default.conf:/etc/nginx/conf.d/default.conf | |
- ./web-server/nginx/local-wp.conf:/etc/nginx/conf.d/local-wp.conf | |
- ./web-server/nginx/remote-wp.conf:/etc/nginx/conf.d/remote-wp.conf | |
expose: | |
- "80" | |
# ports: | |
# - "80:80" | |
links: | |
- php-server | |
networks: | |
default: | |
aliases: | |
- local-wp | |
- remote-wp | |
- local-ms | |
- remote-ms | |
php-server: | |
image: deliciousbrains/php-server@sha256:cedfed62c55a4650e1400fe6f2f708b1835629064ebda342daf7580334e1e332 | |
labels: | |
com.deliciousbrains.service: "php-server" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- web-data | |
expose: | |
- "9000" | |
links: | |
- db-server | |
db-data: | |
image: alpine:3.4 | |
labels: | |
com.deliciousbrains.service: "db-data" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes: | |
- /var/lib/mysql | |
command: ["echo", "DB Data Container"] | |
db-server: | |
image: mariadb:10.1 | |
labels: | |
com.deliciousbrains.service: "db-server" | |
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}" | |
volumes_from: | |
- db-data | |
environment: | |
MYSQL_ROOT_PASSWORD: wp | |
networks: | |
default: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment