提交 37c92997 编写于 作者: B bryk

Fix issue where devs couldn't run serve:prod

This was caused by the wait-for-cluster rule which never finished.
I've moved it to local-up-cluster. Everything works now as expected.
上级 75d0cf2a
...@@ -88,7 +88,7 @@ function executeKubectlCommand(command, doneFn) { ...@@ -88,7 +88,7 @@ function executeKubectlCommand(command, doneFn) {
* * Install golang * * Install golang
* * Install etcd * * Install etcd
*/ */
gulp.task('local-up-cluster', ['spawn-cluster']); gulp.task('local-up-cluster', ['spawn-cluster', 'wait-for-cluster']);
/** /**
* Tears down a Kubernetes cluster. * Tears down a Kubernetes cluster.
......
...@@ -127,19 +127,17 @@ gulp.task('spawn-backend', ['backend', 'kill-backend'], function() { ...@@ -127,19 +127,17 @@ gulp.task('spawn-backend', ['backend', 'kill-backend'], function() {
* backend process is killed beforehand, if any. In production the backend does serve the frontend * backend process is killed beforehand, if any. In production the backend does serve the frontend
* pages as well. * pages as well.
*/ */
gulp.task( gulp.task('spawn-backend:prod', ['build-frontend', 'backend:prod', 'kill-backend'], function() {
'spawn-backend:prod', ['build-frontend', 'backend:prod', 'kill-backend', 'wait-for-cluster'], runningBackendProcess = child.spawn(
function() { path.join(conf.paths.dist, conf.backend.binaryName),
runningBackendProcess = child.spawn( [`--apiserver-host=${conf.backend.apiServerHost}`, `--port=${conf.frontend.serverPort}`],
path.join(conf.paths.dist, conf.backend.binaryName), {stdio: 'inherit', cwd: conf.paths.dist});
[`--apiserver-host=${conf.backend.apiServerHost}`, `--port=${conf.frontend.serverPort}`],
{stdio: 'inherit', cwd: conf.paths.dist}); runningBackendProcess.on('exit', function() {
// Mark that there is no backend process running anymore.
runningBackendProcess.on('exit', function() { runningBackendProcess = null;
// Mark that there is no backend process running anymore. });
runningBackendProcess = null; });
});
});
/** /**
* Kills running backend process (if any). * Kills running backend process (if any).
......
...@@ -43,14 +43,6 @@ func main() { ...@@ -43,14 +43,6 @@ func main() {
glog.Fatal(err) glog.Fatal(err)
} }
serverAPIVersion, err := apiserverClient.ServerAPIVersions()
if err != nil {
glog.Fatal(err)
}
// Display Apiserver version. This is just for tests.
println("Server API version: " + serverAPIVersion.GoString())
// Run a HTTP server that serves static public files from './public' and handles API calls. // Run a HTTP server that serves static public files from './public' and handles API calls.
// TODO(bryk): Disable directory listing. // TODO(bryk): Disable directory listing.
http.Handle("/", http.FileServer(http.Dir("./public"))) http.Handle("/", http.FileServer(http.Dir("./public")))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册