Skip to content

Instantly share code, notes, and snippets.

@AdrienLemaire
Last active February 4, 2019 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrienLemaire/d12826e0e116d4770226c11ca43b869b to your computer and use it in GitHub Desktop.
Save AdrienLemaire/d12826e0e116d4770226c11ca43b869b to your computer and use it in GitHub Desktop.
backstopjs docker
#!/bin/sh
command=$1
shift
yarn css:config
cd ../GOunite/infrastructure/
docker-compose run --no-deps backstop $command --config=backstop.json $@
cd -
if [ "$command" = "test" ]; then
if [ "$(uname)" == 'Darwin' ]; then
open backstop_data/html_report/index.html
else
xdg-open backstop_data/html_report/index.html
fi
fi
---
version: '3.4'
services:
reverse-proxy:
build: ./reverse-proxy
ports:
- 443:443
- 8080:8080
backstop:
image: backstopjs/backstopjs
container_name: backstop
depends_on:
- reverse-proxy
volumes:
- ../../Frontend:/src
shm_size: 512m
{
"scripts": {
"ci:css": "hooks/ci-css",
"css:approve": "hooks/css-approve",
"css:config": "hooks/css-config",
"css:reference": "hooks/css-exec reference",
"css:test": "hooks/css-exec test"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && yarn type-check && hooks/css-regression"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment