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

Update web dockerfile to use dev deps when building prod assets #985

Merged
merged 2 commits into from
May 23, 2018
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
6 changes: 2 additions & 4 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ address of the public API server that's running in your docker environment:

```bash
docker-compose stop web
cd web
../bin/go-run . --api-addr=$DOCKER_IP:8085
bin/web run --api-addr=$DOCKER_IP:8085
```

#### 3. Connect to `public-api` in Kubernetes
Expand All @@ -283,8 +282,7 @@ bin/web port-forward
Then connect the local web process to the forwarded port:

```bash
cd web
../bin/go-run . --api-addr=localhost:8085
bin/web run --api-addr=localhost:8085
```

### Webpack dev server
Expand Down
8 changes: 3 additions & 5 deletions bin/web
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ USAGE
}; function --help { -h ;}

function dev {
setup
build

while getopts "p:" opt; do
case "$opt" in
Expand All @@ -36,7 +36,7 @@ function dev {

cd $ROOT/web/app && yarn webpack-dev-server --port $DEV_PORT &
cd $ROOT/web && \
../bin/go-run . --webpack-dev-server=http://localhost:$DEV_PORT
../bin/go-run . --webpack-dev-server=http://localhost:$DEV_PORT $*
}

function build {
Expand All @@ -58,7 +58,7 @@ function run {
port-forward &

cd $ROOT/web
../bin/go-run .
../bin/go-run . $*
}

function setup {
Expand All @@ -67,8 +67,6 @@ function setup {
}

function test {
setup

cd $ROOT/web/app
yarn karma start --single-run $*
}
Expand Down