2018-06-07 18:52:53 +03:00
|
|
|
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
|
2018-06-07 18:52:53 +03:00
|
|
|
ports:
|
2018-06-14 20:41:07 +03:00
|
|
|
- "8000-8010:8000-8010"
|
2018-06-07 18:52:53 +03:00
|
|
|
volumes:
|
|
|
|
- ./media/:/app/media:delegated
|
|
|
|
- ./bedrock/:/app/bedrock:delegated
|
|
|
|
environment:
|
2018-06-07 21:48:13 +03:00
|
|
|
BS_PROXY_URL: "app:8080"
|
2018-06-07 18:52:53 +03:00
|
|
|
BS_OPEN_BROWSER: "false"
|
|
|
|
|
|
|
|
# the django app
|
|
|
|
app:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
target: devapp
|
|
|
|
image: mozorg/bedrock_test:${GIT_COMMIT:-latest}
|
2018-06-07 21:48:13 +03:00
|
|
|
command: python manage.py runserver 0.0.0.0:8080
|
2018-06-07 18:52:53 +03:00
|
|
|
env_file: .env
|
|
|
|
ports:
|
2018-06-07 21:48:13 +03:00
|
|
|
- "8080:8080"
|
2018-06-07 18:52:53 +03:00
|
|
|
volumes:
|
|
|
|
- ./bedrock/:/app/bedrock:delegated
|
|
|
|
- ./bin/:/app/bin:delegated
|
|
|
|
- ./docker/:/app/docker:delegated
|
|
|
|
- ./etc/:/app/etc:delegated
|
|
|
|
- ./lib/:/app/lib:delegated
|
2019-01-10 03:21:23 +03:00
|
|
|
- ./docs/:/app/docs:delegated
|
2018-06-07 18:52:53 +03:00
|
|
|
- ./media/:/app/media:delegated
|
|
|
|
- ./root_files/:/app/root_files:delegated
|
|
|
|
- ./scripts/:/app/scripts:delegated
|
|
|
|
- ./vendor-local/:/app/vendor-local:delegated
|
|
|
|
- ./wsgi/:/app/wsgi:delegated
|
2019-09-06 23:53:00 +03:00
|
|
|
- ./locale/:/app/locale:delegated
|
|
|
|
- ./l10n/:/app/l10n:delegated
|
|
|
|
- ./git-repos/:/app/git-repos:delegated
|
2018-06-07 18:52:53 +03:00
|
|
|
|
|
|
|
# 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
|
2018-11-14 18:54:32 +03:00
|
|
|
- ./tests/:/app/tests:delegated
|
2018-06-07 18:52:53 +03:00
|
|
|
- ./vendor-local/:/app/vendor-local:delegated
|
|
|
|
- ./wsgi/:/app/wsgi:delegated
|
2019-09-06 23:53:00 +03:00
|
|
|
- ./l10n/:/app/l10n:delegated
|
|
|
|
- ./git-repos/:/app/git-repos:delegated
|
2018-06-07 18:52:53 +03:00
|
|
|
|
|
|
|
# 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}
|
2020-04-27 17:38:07 +03:00
|
|
|
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
|
2018-06-07 18:52:53 +03:00
|
|
|
|
|
|
|
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}
|