Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SETUP] Make use of docker-compose profiles. #194

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/docker/backstop
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

docker-compose -f docker-compose.yml run --rm --workdir /src backstop node ./bin/backstop.js "$@"
docker-compose --profile visual-regression run --rm --workdir /src backstop node ./bin/backstop.js "$@"
2 changes: 1 addition & 1 deletion bin/docker/disable_blackfire
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

docker-compose -f docker-compose.yml -f docker-compose-blackfire.yml stop && docker-compose up -d --remove-orphans
docker-compose --profile profiling stop && docker-compose up -d --remove-orphans
2 changes: 1 addition & 1 deletion bin/docker/enable_blackfire
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

docker-compose stop && docker-compose -f docker-compose.yml -f docker-compose-blackfire.yml up -d
docker-compose stop && docker-compose --profile profiling up -d
6 changes: 3 additions & 3 deletions bin/docker/setup_backstop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ENVIRONMENT="${@:-local}"

docker-compose -f docker-compose.yml run --rm --workdir /src backstop cp config/${ENVIRONMENT}/cookies.json.dist config/${ENVIRONMENT}/cookies.json;
docker-compose -f docker-compose.yml run --rm --workdir /src backstop cp config/${ENVIRONMENT}/secrets.json.dist config/${ENVIRONMENT}/secrets.json;
docker-compose --profile visual-regression run --rm --workdir /src backstop cp config/${ENVIRONMENT}/cookies.json.dist config/${ENVIRONMENT}/cookies.json;
docker-compose --profile visual-regression run --rm --workdir /src backstop cp config/${ENVIRONMENT}/secrets.json.dist config/${ENVIRONMENT}/secrets.json;

docker-compose -f docker-compose.yml run --rm --workdir /src backstop npm install;
docker-compose --profile visual-regression run --rm --workdir /src backstop npm install;
17 changes: 0 additions & 17 deletions docker-compose-blackfire.yml

This file was deleted.

13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,19 @@ services:
- vr_node_modules:/src/app/node_modules:delegated
extra_hosts:
- '${LOOPBACK_HOST_NAME}:192.168.35.10' # IP should match the IP address set for nginx above
profiles:
- visual-regression

blackfire:
build:
context: docker/blackfire
dockerfile: Dockerfile
env_file:
- docker/blackfire/.env
ports:
- '127.0.0.1:8707:8707'
profiles:
- profiling

volumes:
vr_yarn_cache:
Expand Down