Merge "sfdc config for pushkin"
diff --git a/docker/swarm/stack/pushkin.yml b/docker/swarm/stack/pushkin.yml
index 892b4f9..d4cc6e6 100644
--- a/docker/swarm/stack/pushkin.yml
+++ b/docker/swarm/stack/pushkin.yml
@@ -14,7 +14,14 @@
webhook_recipients: "recepient1@mail.com,recepient2@mail.com"
webhook_login_id: 13
webhook_application_id: 24
- webhook_sfdc_username: your_sfdc_username
+ sfdc_auth_url: https://login.salesforce.com/services/oauth2/token
+ sfdc_username: user@example.net
+ sfdc_password: secret
+ sfdc_consumer_key: example_consumer_key
+ sfdc_consumer_secret: example_consumer_secret
+ sfdc_organization_id: example_organization_id
+ sfdc_sandbox_enabled: true
+ sfdc_case_fields: case_and_bool_value
docker:
client:
stack:
@@ -32,7 +39,14 @@
WEBHOOK_RECIPIENTS: ${_param:webhook_recipients}
WEBHOOK_LOGIN_ID: ${_param:webhook_login_id}
WEBHOOK_APPLICATION_ID: ${_param:webhook_application_id}
- WEBHOOK_SFDC_USERNAME: ${_param:webhook_sfdc_username}
+ SFDC_AUTH_URL: ${_param:sfdc_auth_url}
+ SFDC_USERNAME: ${_param:sfdc_username}
+ SFDC_PASSWORD: ${_param:sfdc_password}
+ SFDC_CONSUMER_KEY: ${_param:sfdc_consumer_key}
+ SFDC_CONSUMER_SECRET: ${_param:sfdc_consumer_secret}
+ SFDC_ORGANIZATION_ID: ${_param:sfdc_organization_id}
+ SFDC_SANDBOX_ENABLED: ${_param:sfdc_sandbox_enabled}
+ SFDC_CASE_FIELDS: ${_param:sfdc_case_fields}
service:
pushkin-api:
image: ${_param:docker_image_pushkin}
diff --git a/postgresql/client/sfdc.yml b/postgresql/client/sfdc.yml
new file mode 100644
index 0000000..bafd9c9
--- /dev/null
+++ b/postgresql/client/sfdc.yml
@@ -0,0 +1,30 @@
+classes:
+ - system.postgresql.client
+parameters:
+ _param:
+ sfdc_db_host: ${_param:haproxy_postgresql_bind_host}
+ sfdc_db_user: sfdc
+ sfdc_db_user_password: sfdc
+ sfdc_login_id: 14
+ sfdc_application_id: 4
+ postgresql:
+ client:
+ server:
+ server01:
+ database:
+ sfdc:
+ enabled: true
+ encoding: 'UTF8'
+ locale: 'en_US'
+ users:
+ - name: ${_param:sfdc_db_user}
+ password: ${_param:sfdc_db_user_password}
+ host: ${_param:sfdc_db_host}
+ createdb: true
+ rights: all privileges
+ init:
+ maintenance_db: pushkin
+ force: true
+ queries:
+ - INSERT INTO login VALUES (${_param:sfdc_login_id}, ${_param:sfdc_application_id}) ON CONFLICT (id) DO UPDATE SET id = excluded.id;
+ - INSERT INTO device VALUES (${_param:sfdc_application_id}, ${_param:sfdc_login_id}, 42, 'salesforce_service', NULL, 1, NULL) ON CONFLICT (id) DO UPDATE SET id = excluded.id;