Production Configuration

Production Config

The following command string may be used to run the program using the values defined in the ./.prd.config.json file.

    go run main.go -prod

The generated sample production configuration file should be edited to match the local environment. Jiffy will generate a sample .prod.config.json file similar to the one shown below:

{
    "external_address": "127.0.0.1:8080",
    "internal_address": "127.0.0.1:4444",
    "env": "prod",
    "ping_cycle": 1,
    "failure_threshold": 5,
    "pepper": "secret-pepper-key",
    "hmac_Key": "secret-hmac-key",
    "database": {
        "db_dialect":   "postgres",
        "host":         "localhost",
        "port":         5432,
        "user":         "godev",
        "password":     "gogogo123",
        "name":         "glrestgen",
        "ormLogActive": true
    },
    "group_leader_kvs": {
        "local_standalone": {
            "active": true,
            "internal_address": "127.0.0.1:4444"
        },
        "redis": {
            "active": false,
            "max_idle": 80,
            "max_active": 12000,
            "redis_protocol": "tcp",
            "redis_address": "127.0.0.1:6379"
        },
        "memcached": {
            "active": false,
            "memcached_addresses": [
                "192.168.112.50:11211"
            ]
        },
        "sluggo": {
            "active": false,
            "sluggo_address": "127.0.0.1:7070"
        }
    },
    "logging": {
        "active": true,
        "callLocation": false,
        "colorMsgTypes": true,
        "infoMsgs": false,
        "warningMsgs": true,
        "errorMsgs": true,
        "debugMsgs": false,
        "traceMsgs": false
    },
    "cert_file": "srvcert.cer",
    "key_file": "srvcert.key",
    "rsa256_priv_key_file": "",
    "rsa256_pub_key_file": "",
    "rsa384_priv_key_file": "",
    "rsa384_pub_key_file": "",
    "rsa512_priv_key_file": "",
    "rsa512_pub_key_file": "",
    "ecdsa256_priv_key_file": "",
    "ecdsa256_pub_key_file": "",
    "ecdsa384_priv_key_file": "jwtkeys/ecdsa384/ec384.priv.pem",
    "ecdsa384_pub_key_file": "jwtkeys/ecdsa384/ec384.pub.pem",
    "ecdsa521_priv_key_file": "",
    "ecdsa521_pub_key_file": "",
    "jwt_sign_method": "ES384",
    "jwt_lifetime": 120,
    "service_activations": [
        {
            "service_name":   "Library",
            "service_active": true
        },
        {
            "service_name":   "Book",
            "service_active": true
        }
        ]
}