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} command: gulp watch 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 - ./media/:/app/media:delegated - ./root_files/:/app/root_files:delegated - ./scripts/:/app/scripts:delegated - ./vendor-local/:/app/vendor-local:delegated - ./wsgi/:/app/wsgi: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 - ./test/:/app/test:delegated - ./vendor-local/:/app/vendor-local:delegated - ./wsgi/:/app/wsgi: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} 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}