-
Notifications
You must be signed in to change notification settings - Fork 46
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
Set up Docker deployment and Express Server #990
Conversation
…nto feature/server
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
…rk with component previews in Pattern Lab; updating CORS settings
⚡ PR built on Travis and deployed a now preview here:
|
🎉 Awesome!! Happy New Year! |
…ering improvements + wiring up initial redux support to @bolt/core
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
This should hopefully be good to merge in later today after a few small changes I’ll be wrapping up this morning:
|
… component explorer working as expected
…d for updated setState method being added to @bolt/core
…core base component
…N Schema Form errors
… shallowly (vs deeply)
…loading; fixes recent issues with __webpack_hmr 404 errors
…mponent explorer instead!
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
⚡ PR built on Travis and deployed a now preview here:
|
Jira
Summary
Replacing static site hosting with an Express server and a Docker deployment and wiring up the Bolt API!
Details
Travis CI builds a Docker image that runs the install, build, and test and then pushes it up to Docker Hub, then our deploy script goes into the
./deploys/
folder to run the now.sh deploy that pulls that Docker image down to run and serve. This is done to get around issues that now's deploy script has with upload all the correct files due to it's incorrect parsing of ignore files. Additionally, all build dependencies like php, node, and yarn version are pre-built into thebolt-docker
image (details on Docker Hub and the GitHub repo).Additionally, the route that was available at
/api
when running the local server is now hooked up to the hosted site! It's using the same routing so all should be available locally and on the deployed server.I've also added the now.sh unique deploy urls as a commit status check to each commit so you can view the unique url each commit generated.
How to test
All of this relates to CI work so checking Travis logs and its deployed site should be enough. However, one could build and run the Docker container using these commands:
To test the api, send a GET request to
/api
and you'll get back a simple response saying you've hit the Bolt API. The only other route that was being used locally,/api/render-twig
is also available, but ensuring that it works on server as it does with a local server is outside the scope of this PR.Remaining Work
https://github.com/bolt-design-system/bolt/blob/aebfb651e250e0fab1610662622b3b56b773ad33/Xnow.old.json#L8-L37
now rm boltdesignsystem --safe --yes # --safe skips removing ones with active alias
Speed up CI. This looks like it's adding more time than I'd like.
Consider how to handle NPM deps used in Deploy and Nightwatch scripts. I'm skipping the
yarn install
in the Travis build as the Docker build does that, so when our scripts that deploy and kick off Nightwatch testing start, they don't have. Currently I've set up the./scripts
folders ownpackage.json
as a workaround:https://github.com/bolt-design-system/bolt/blob/7d983c69d98caf2d3fc0623ce22bc8f18a598ebf/.travis.yml#L37-L40