bedrock/docker-compose.yml

110 строки
3.1 KiB
YAML
Исходник Обычный вид История

version: '3.4'
services:
# Run browser-sync and compile static assets.
#
# This is the primary server and it proxies
# the Django app so that it can add the fancy
# browser refresh JS.
assets:
build:
context: .
target: assets
image: mozorg/bedrock_assets:${GIT_COMMIT:-latest}
2019-02-25 13:45:53 +03:00
command: gulp
ports:
- "8000-8010:8000-8010"
volumes:
- ./media/:/app/media:delegated
- ./bedrock/:/app/bedrock:delegated
environment:
BS_PROXY_URL: "app:8080"
BS_OPEN_BROWSER: "false"
# the django app
app:
build:
context: .
target: devapp
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
command: python manage.py runserver 0.0.0.0:8080
env_file: .env
ports:
- "8080:8080"
volumes:
- ./bedrock/:/app/bedrock:delegated
- ./bin/:/app/bin:delegated
- ./docker/:/app/docker:delegated
- ./etc/:/app/etc:delegated
- ./lib/:/app/lib:delegated
- ./docs/:/app/docs:delegated
- ./media/:/app/media:delegated
- ./root_files/:/app/root_files:delegated
- ./scripts/:/app/scripts:delegated
- ./vendor-local/:/app/vendor-local:delegated
- ./wsgi/:/app/wsgi:delegated
- ./locale/:/app/locale:delegated
- ./l10n/:/app/l10n:delegated
- ./git-repos/:/app/git-repos:delegated
# run the tests against local changes
test:
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
env_file: docker/envfiles/test.env
volumes:
- ./bedrock/:/app/bedrock:delegated
- ./bin/:/app/bin:delegated
- ./docker/:/app/docker:delegated
- ./etc/:/app/etc:delegated
- ./lib/:/app/lib:delegated
- ./media/:/app/media:delegated
- ./root_files/:/app/root_files:delegated
- ./scripts/:/app/scripts:delegated
- ./tests/:/app/tests:delegated
- ./vendor-local/:/app/vendor-local:delegated
- ./wsgi/:/app/wsgi:delegated
- ./l10n/:/app/l10n:delegated
- ./git-repos/:/app/git-repos:delegated
# run tests with no volumes
test-image:
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
env_file: docker/envfiles/test.env
# the django app
release:
build:
context: .
target: release
args:
GIT_SHA: ${GIT_COMMIT:-latest}
BRANCH_NAME: ${BRANCH_NAME:-latest}
image: mozorg/bedrock:${BRANCH_AND_COMMIT:-latest}
env_file: .env
ports:
- "8000:8000"
volumes:
- ./bedrock/:/app/bedrock:delegated
- ./bin/:/app/bin:delegated
- ./docker/:/app/docker:delegated
- ./etc/:/app/etc:delegated
- ./lib/:/app/lib:delegated
- ./root_files/:/app/root_files:delegated
- ./scripts/:/app/scripts:delegated
- ./vendor-local/:/app/vendor-local:delegated
- ./wsgi/:/app/wsgi:delegated
- ./locale/:/app/locale:delegated
- ./l10n/:/app/l10n:delegated
- ./git-repos/:/app/git-repos:delegated
builder:
build:
context: .
target: python-builder
image: mozorg/bedrock_build:${GIT_COMMIT:-latest}
app-base:
build:
context: .
target: app-base
image: mozorg/bedrock_code:${GIT_COMMIT:-latest}