Skip to content

Commit

Permalink
update docker compose file, also fixed a bug in the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
johankristianss committed Jun 30, 2024
1 parent 7221666 commit b3aa0ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
volumes:
- colonies_etcd:/var/colonies/etcd
ports:
- "${COLONIES_SERVER_PORT}:${COLONIES_SERVER_PORT}"
- "0.0.0.0:${COLONIES_SERVER_PORT}:${COLONIES_SERVER_PORT}"
command: sh -c "colonies server start --initdb --port ${COLONIES_SERVER_PORT} --relayport 25100 --etcdname server1 --etcdhost colonies-server --etcdclientport 23100 --etcdpeerport 24100 --initial-cluster server1=colonies-server:24100:25100:${COLONIES_SERVER_PORT} --etcddatadir /var/colonies/etcd --insecure"

colonies-setup:
Expand Down
10 changes: 8 additions & 2 deletions internal/cli/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func init() {
submitFuncSpecCmd.MarkFlagRequired("spec")
submitFuncSpecCmd.Flags().BoolVarP(&PrintOutput, "out", "", false, "Print process output, wait flag must be set")
submitFuncSpecCmd.Flags().BoolVarP(&Follow, "follow", "", false, "Follow process, wait flag cannot be set")
submitFuncSpecCmd.Flags().BoolVarP(&Snapshot, "snapshot", "", false, "Automatically create snapshot")
submitFuncSpecCmd.Flags().StringVarP(&Label, "label", "", "", "Add a label")

execFuncCmd.Flags().StringVarP(&PrvKey, "prvkey", "", "", "Private key")
Expand All @@ -51,6 +52,7 @@ func init() {
execFuncCmd.Flags().BoolVarP(&PrintOutput, "out", "", false, "Print process output, wait flag must be set")
execFuncCmd.Flags().BoolVarP(&Follow, "follow", "", false, "Follow process, wait flag cannot be set")
execFuncCmd.Flags().StringVarP(&Label, "label", "", "", "Add a label")
execFuncCmd.Flags().BoolVarP(&Snapshot, "snapshot", "", false, "Automatically create snapshot")

removeFuncCmd.Flags().StringVarP(&FunctionID, "functionid", "", "", "FunctionID")
removeFuncCmd.MarkFlagRequired("functionid")
Expand Down Expand Up @@ -235,7 +237,9 @@ var submitFuncSpecCmd = &cobra.Command{
funcSpec.Conditions.ColonyName = ColonyName
}

createSnapshot(funcSpec, client)
if Snapshot {
createSnapshot(funcSpec, client)
}

if Label != "" {
funcSpec.Label = Label
Expand Down Expand Up @@ -331,7 +335,9 @@ var execFuncCmd = &cobra.Command{
Conditions: conditions,
Env: env}

createSnapshot(&funcSpec, client)
if Snapshot {
createSnapshot(&funcSpec, client)
}

if Label != "" {
funcSpec.Label = Label
Expand Down
1 change: 1 addition & 0 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ var Days int
var ASCII bool
var Print bool
var SecondsBack int
var Snapshot bool

func init() {
rootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "Verbose (debugging)")
Expand Down

0 comments on commit b3aa0ce

Please sign in to comment.