-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add remote docker chrome target for CI server #129
base: master
Are you sure you want to change the base?
Add remote docker chrome target for CI server #129
Conversation
It is the URL where storybook is running, not where docker is running
They will be needed for the new existing-docker-target. This also makes the code more readable.
This adds a new target for running storybook in chrome on an existing docker container. The target isn't exported directly, but as a variant of the chromeDockerTarget to make it possible to let Loki run docker on a local machine while enabling the use of an existing container with a flag on the CI. This way the same target config can be used on local and on the CI. The biggest challenge with this change was to provide access to local files as we cannot assume that the external headless chrome docker container has access to those. Instead Loki will run a small static server to serve the file and direct the headless chrome towards this page. Two new packages are added: bluebird for better promise handling, especially timeouts, and serve-handler to serve the static directory. All changes are behind the chromeDockerUseExisting flag which is false by default, so there should be no breaking changes.
@MaciejJaroszewski thank you for pushing this forward! |
74f310e
to
b8b5e98
Compare
I know I'm late to the party, but would it be easier to use the // loki.config.js
module.exports = {
configurations: {
desktop: {
target: process.env.CI ? "chrome.app" : "chrome.docker",
width: 1366,
height: 768,
deviceScaleFactor: 1,
mobile: false,
},
},
}; |
I know this PR is quite old, but I'm wondering if there's a chance to get this looked at again? Or if there's a suggested way of using |
PR resolves:
Thanks @dbartholomae for initial commits.
Resolve issue #94