{ "Affinities": null, "AllAtOnce": false, "Constraints": null, "ConsulNamespace": "", "CreateIndex": 13569048, "Datacenters": [ "dc1" ], "DispatchIdempotencyToken": "", "Dispatched": false, "ID": "postgres-15", "JobModifyIndex": 13569135, "Meta": null, "ModifyIndex": 13569135, "Multiregion": null, "Name": "postgres-15", "Namespace": "default", "NodePool": "default", "NomadTokenID": "", "ParameterizedJob": null, "ParentID": "", "Payload": null, "Periodic": null, "Priority": 50, "Region": "global", "Spreads": null, "Stable": false, "Status": "running", "StatusDescription": "", "Stop": false, "SubmitTime": 1738279443028435823, "TaskGroups": [ { "Affinities": null, "Constraints": null, "Consul": { "Cluster": "default", "Namespace": "", "Partition": "" }, "Count": 1, "Disconnect": null, "EphemeralDisk": { "Migrate": false, "SizeMB": 300, "Sticky": false }, "MaxClientDisconnect": null, "Meta": null, "Migrate": null, "Name": "group", "Networks": [ { "ReservedPorts": [ { "HostNetwork": "default", "Label": "api", "To": 8008, "Value": 8008 }, { "HostNetwork": "default", "Label": "pg", "To": 5432, "Value": 5432 } ] } ], "PreventRescheduleOnLost": false, "ReschedulePolicy": null, "RestartPolicy": { "Attempts": 2, "Delay": 15000000000, "Interval": 1800000000000, "Mode": "fail", "RenderTemplates": false }, "Scaling": null, "Services": null, "ShutdownDelay": null, "Spreads": null, "StopAfterClientDisconnect": null, "Tasks": [ { "Actions": null, "Affinities": null, "Artifacts": null, "CSIPluginConfig": null, "Config": { "ports": [ "api", "pg" ], "image": "ghcr.io/sstent/nomad-pgsql-patroni:latest", "volumes": [ "/mnt/configs/postgres:/store" ] }, "Constraints": null, "Consul": null, "DispatchPayload": null, "Driver": "docker", "Env": { "PGDATA": "/store/data" }, "Identities": null, "Identity": { "Audience": [ "nomadproject.io" ], "ChangeMode": "", "ChangeSignal": "", "Env": false, "File": false, "Filepath": "", "Name": "default", "ServiceName": "", "TTL": 0 }, "KillSignal": "", "KillTimeout": 5000000000, "Kind": "", "Leader": false, "Lifecycle": null, "LogConfig": { "Disabled": false, "MaxFileSizeMB": 10, "MaxFiles": 10 }, "Meta": null, "Name": "db", "Resources": { "CPU": 100, "Cores": 0, "Devices": null, "DiskMB": 0, "IOPS": 0, "MemoryMB": 1024, "MemoryMaxMB": 0, "NUMA": null, "Networks": null, "SecretsMB": 0 }, "RestartPolicy": { "Attempts": 2, "Delay": 15000000000, "Interval": 1800000000000, "Mode": "fail", "RenderTemplates": false }, "ScalingPolicies": null, "Schedule": null, "Services": null, "ShutdownDelay": 0, "Templates": [ { "ChangeMode": "restart", "ChangeScript": null, "ChangeSignal": "", "DestPath": "/secrets/patroni.yml", "EmbeddedTmpl": "scope: postgres\nname: pg-{{env \"node.unique.name\"}}\nnamespace: /nomad\n\nrestapi:\n listen: 0.0.0.0:8008\n connect_address: {{env \"attr.unique.network.ip-address\"}}:8008\n\nconsul:\n scheme: http\n host: {{env \"attr.unique.network.ip-address\"}}:8500\n register_service: True\n\nbootstrap:\n dcs:\n ttl: 30\n loop_wait: 10\n retry_timeout: 10\n maximum_lag_on_failover: 1048576\n postgresql:\n use_pg_rewind: true\n use_slots: true\n parameters:\n timezone: 'UTC'\n max_connections: 100\n shared_preload_libraries: pg_stat_statements\n shared_buffers: 64MB\n work_mem: 16MB\n effective_cache_size: 512MB\n tcp_keepalives_idle: 300\n timescaledb.telemetry_level: off\n\n method: local\n local:\n command: /usr/local/bin/docker-initdb.sh\n keep_existing_recovery_conf: True\n\n initdb:\n - encoding: UTF8\n\n pg_hba:\n - host all postgres all md5\n - host replication repl all md5\n - host all all all md5\n\n users:\n postgres:\n password: postgres\n options:\n - createrole\n - createdb\n repl:\n password: repl\n options:\n - replication\n\npostgresql:\n listen: 0.0.0.0:5432\n connect_address: {{env \"attr.unique.network.ip-address\"}}:5432\n use_unix_socket: true\n data_dir: /store/data\n authentication:\n replication:\n username: repl\n password: repl\n superuser:\n username: postgres\n password: postgres\n", "Envvars": false, "ErrMissingKey": false, "Gid": null, "LeftDelim": "{{", "Once": false, "Perms": "0644", "RightDelim": "}}", "SourcePath": "", "Splay": 5000000000, "Uid": null, "VaultGrace": 0, "Wait": null } ], "User": "", "Vault": null, "VolumeMounts": null } ], "Update": null, "Volumes": null } ], "Type": "system", "UI": null, "Update": { "AutoPromote": false, "AutoRevert": false, "Canary": 0, "HealthCheck": "", "HealthyDeadline": 0, "MaxParallel": 0, "MinHealthyTime": 0, "ProgressDeadline": 0, "Stagger": 0 }, "VaultNamespace": "", "Version": 2, "VersionTag": null }