Merge pull request #73 from hashicorp/chore-docker-build
chore: add containerized build and readme instructions
This commit is contained in:
3 files changed
+43
-2
No files matched your search
@@ -20,6 +20,7 @@ subproject, e.g. running or testing.
|
||||
- [Branching](#branching)
|
||||
- [Building ToC](#building-toc)
|
||||
- [Building Core UI for Production](#building-core-ui-for-production)
|
||||
- [Building with a Container](#building-with-a-container)
|
||||
- [Committing](#committing)
|
||||
- [License Checking](#license-checking)
|
||||
|
||||
@@ -111,7 +112,18 @@ To quickly produce a production build of Core UI, run from this folder:
|
||||
|
||||
```bash
|
||||
yarn install
|
||||
yarn build:production:core
|
||||
yarn build:production:ui:core
|
||||
```
|
||||
|
||||
Assets are saved to `ui/core/dist/`.
|
||||
|
||||
#### Building with a Container
|
||||
|
||||
Optionally, you may build the UI within a container. Execute the
|
||||
following command:
|
||||
|
||||
```bash
|
||||
./build_production.sh
|
||||
```
|
||||
|
||||
Assets are saved to `ui/core/dist/`.
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Note: this will change the permissions of the files in this directory after
|
||||
# running to allow for easy deletion, so this should only be run as part of
|
||||
# watchtower's build task.
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
node: &node
|
||||
image: node:12
|
||||
volumes:
|
||||
- './:/src'
|
||||
- 'icu_node_modules:/src/node_modules'
|
||||
- 'icu_addons_api_node_modules:/src/addons/api/node_modules'
|
||||
- 'icu_addons_auth_node_modules:/src/addons/auth/node_modules'
|
||||
- 'icu_addons_rose_node_modules:/src/addons/rose/node_modules'
|
||||
- 'icu_ui_core_node_modules:/src/ui/core/node_modules'
|
||||
working_dir: /src
|
||||
|
||||
build_production:
|
||||
<<: *node
|
||||
entrypoint: bash
|
||||
command: '-c "yarn install && yarn build:production:ui:core && chmod -R 777 ."'
|
||||
|
||||
volumes:
|
||||
icu_node_modules:
|
||||
icu_addons_api_node_modules:
|
||||
icu_addons_auth_node_modules:
|
||||
icu_addons_rose_node_modules:
|
||||
icu_ui_core_node_modules:
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
"ui/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build:production:core": "cd ui/core && yarn build:production",
|
||||
"build:production:ui:core": "cd ui/core && yarn build:production",
|
||||
"lint": "yarn lint:addons:api && yarn lint:addons:auth && yarn lint:addons:rose && yarn lint:ui:core",
|
||||
"lint:addons:api": "echo \"\n\nlint: addons/api\n\" && cd addons/api && yarn lint",
|
||||
"lint:addons:auth": "echo \"\n\nlint: addons/auth\n\" && cd addons/auth && yarn lint",
|
||||
|
||||
Reference in new issue
Block a user