Gateway Deployment Mode

We are trying to use deployment modes to program against a gateway copy of a production gateway. I have set up a docker container for the local copy, added a Dev Mode, and successfully edited the ignition.conf file to change modes. What I did not realize is if I take a gateway backup of the Dev server and restore it on the production server the production server will start in Dev mode since the ignition.conf file is part of the gateway backup.

How can I start the Docker gateway in Dev mode without editing the ignition.conf file? Is there a way to specify mode in the docker compose file or command that starts ignition? Specifying the gateway mode in the ignition.conf file is not he best way to change the mode.

See Docker Image | Ignition User Manual, I think this is what you want.

1 Like

Here is the command portion of the compose.yaml file:

    command: >
      -n sweet-eddies
      -m ${GATEWAY_MAX_MEMORY:-512}

I changed it to this and Ignition would not start:

    command: >
      -n sweet-eddies
      -m ${GATEWAY_MAX_MEMORY:-512}
      -Dignition.config.mode=Dev

This does work:

    command: >
      -n sweet-eddies
      -m ${GATEWAY_MAX_MEMORY:-512}
      --
      wrapper.java.initmemory=512
      -Dignition.config.mode=Dev

Not sure why… @Kevin.Herron thanks for pointing me in the right direction.

Arguments before the double hyphen are part of the docker run command. Arguments after are passed in to the container entrypoint itself.

1 Like

So I do not need the wrapper.java.initmemory=512 line. I would be great if there was an environment variable you could set instead. Thanks!!

Is it possible to edit the service start command in Windows to do the same thing?

Not exactly, but there's a different way to solve the same goal:

1 Like