mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
Fix --services flag format (#841)
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ COPY docker/start.sh /start.sh
|
||||
|
||||
WORKDIR /etc/temporal
|
||||
|
||||
ENV SERVICES="history,matching,frontend,worker"
|
||||
ENV SERVICES="--services=history --services=matching --services=frontend --services=worker"
|
||||
|
||||
EXPOSE 6933 6934 6935 6939 7233 7234 7235 7239
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
|
||||
+11
-1
@@ -28,6 +28,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
|
||||
@@ -95,7 +96,7 @@ func buildCLI() *cli.App {
|
||||
zone := c.GlobalString("zone")
|
||||
configDir := path.Join(c.GlobalString("root"), c.GlobalString("config"))
|
||||
|
||||
services := c.StringSlice("services")
|
||||
services := splitServices(c.StringSlice("services"))
|
||||
|
||||
s := temporal.NewServer(
|
||||
temporal.ForServices(services),
|
||||
@@ -114,3 +115,12 @@ func buildCLI() *cli.App {
|
||||
}
|
||||
return app
|
||||
}
|
||||
|
||||
// For backward compatiblity to support old flag format (i.e. `--services=frontend,history,matching`).
|
||||
func splitServices(services []string) []string {
|
||||
var result []string
|
||||
for _, service := range services {
|
||||
result = append(result, strings.Split(service, ",")...)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ set -ex
|
||||
|
||||
dockerize -template /etc/temporal/config/config_template.yaml:/etc/temporal/config/docker.yaml
|
||||
|
||||
exec temporal-server --root $TEMPORAL_HOME --env docker start --services=$SERVICES
|
||||
exec temporal-server --root $TEMPORAL_HOME --env docker start $SERVICES
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ make install-schema
|
||||
### Start temporal server
|
||||
```
|
||||
cd $GOPATH/github.com/temporalio/temporal
|
||||
./temporal-server start --services=frontend,matching,history,worker
|
||||
./temporal-server start
|
||||
```
|
||||
|
||||
## MySQL
|
||||
@@ -40,7 +40,7 @@ make install-schema-mysql
|
||||
```
|
||||
cd $GOPATH/github.com/temporalio/temporal
|
||||
cp config/development_mysql.yaml config/development.yaml
|
||||
./temporal-server start --services=frontend,matching,history,worker
|
||||
./temporal-server start
|
||||
```
|
||||
|
||||
# Config
|
||||
|
||||
Reference in New Issue
Block a user