提交 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) {
* * Install golang
* * Install etcd
*/
gulp.task('local-up-cluster', ['spawn-cluster']);
gulp.task('local-up-cluster', ['spawn-cluster', 'wait-for-cluster']);
/**
* Tears down a Kubernetes cluster.
......
......@@ -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
* pages as well.
*/
gulp.task(
'spawn-backend:prod', ['build-frontend', 'backend:prod', 'kill-backend', 'wait-for-cluster'],
function() {
runningBackendProcess = child.spawn(
path.join(conf.paths.dist, conf.backend.binaryName),
[`--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 = null;
});
});
gulp.task('spawn-backend:prod', ['build-frontend', 'backend:prod', 'kill-backend'], function() {
runningBackendProcess = child.spawn(
path.join(conf.paths.dist, conf.backend.binaryName),
[`--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 = null;
});
});
/**
* Kills running backend process (if any).
......
......@@ -43,14 +43,6 @@ func main() {
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.
// TODO(bryk): Disable directory listing.
http.Handle("/", http.FileServer(http.Dir("./public")))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册