I’m on Ubuntu 14.04. SG version is 1.2.
Following this document Configuration using a configuration file I found this command:
$ sync_gateway config.json
This will start SG in the foreground. Is this the right approach for production? I’d like to run SG as a service. After installing SG you can read this in the terminal:
You have successfully installed Couchbase Sync Gateway.
You can find sample sync_gateway configuration files in the /opt/couchbase-sync-gateway/examples folder.
You can control the Couchbase Sync Gateway service by using the following command:
service sync_gateway start
That’s it! Sync Gateway is now running on port 4984. We’ve setup a simple in-memory database
which works great for exploring Sync Gateway’s capabilities. A limited console is available
by opening your browser to http://localhost:4985/_admin/.
The command-line options are:
-adminInterface=":4985": Address to bind admin interface to
-bucket=“sync_gateway”: Name of bucket
-dbname="": Name of CouchDB database (defaults to name of bucket)
-interface=":4984": Address to bind to
-log="": Log keywords, comma separated
-personaOrigin="": Base URL that clients use to connect to the server
-pool=“default”: Name of pool
-pretty=false: Pretty-print JSON responses
-url=“walrus:”: Address of Couchbase server
-verbose=false: Log more info about requests
Running this command
service sync_gateway [start | stop] works but the config file is not set. At least this is what I think.
What is the command to start SG with config file as a service in production on Ubuntu 14.04?