moved to integreat
This commit is contained in:
@@ -5,4 +5,5 @@
|
||||
:aws-secret-access-key "emIzqz9zW+5WrbJHwc1MI0gSS9IXF5feFFxnQI+7"
|
||||
:aws-region "us-east-1"
|
||||
:invoice-import-queue-url "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-prod"
|
||||
:invoice-email "invoices@mail.app.integreatconsult.com"
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@
|
||||
:aws-secret-access-key "Z+AOjQU9M4SwKVU2meYtyNxXtz1Axu/9xohvteXf"
|
||||
:aws-region "us-east-1"
|
||||
:invoice-import-queue-url "https://sqs.us-east-1.amazonaws.com/679918342773/integreat-mail-staging"
|
||||
:invoice-email "invoices-staging@mail.app.integreatconsult.com"
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
config: /usr/local/config/prod.edn
|
||||
VIRTUAL_HOST: integreat.aws.brycecovertoperations.com
|
||||
LETSENCRYPT_HOST: integreat.aws.brycecovertoperations.com
|
||||
VIRTUAL_HOST: app.integreatconsult.com
|
||||
LETSENCRYPT_HOST: staging.app.integreatconsult.com,app.integreatconsult.com
|
||||
LETSENCRYPT_EMAIL: le@brycecovertoperations.com
|
||||
database:
|
||||
restart: always
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '3'
|
||||
services:
|
||||
nginx-proxy:
|
||||
restart: always
|
||||
restart: "always"
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8443:443"
|
||||
@@ -11,7 +11,7 @@ services:
|
||||
- /opt/integreat/staging/etc/nginx/vhost.d:/etc/nginx/vhost.d
|
||||
- /opt/integreat/staging/usr/share/nginx/html:/usr/share/nginx/html
|
||||
letsencrypt:
|
||||
restart: always
|
||||
restart: "always"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /opt/integreat/staging/certs/:/etc/nginx/certs
|
||||
@@ -21,8 +21,8 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
config: /usr/local/config/staging.edn
|
||||
VIRTUAL_HOST: staging.integreat.aws.brycecovertoperations.com
|
||||
LETSENCRYPT_HOST: staging.integreat.aws.brycecovertoperations.com
|
||||
VIRTUAL_HOST: staging.app.integreatconsult.com
|
||||
LETSENCRYPT_HOST: staging.app.integreatconsult.com,app.integreatconsult.com
|
||||
LETSENCRYPT_EMAIL: le@brycecovertoperations.com
|
||||
database:
|
||||
restart: always
|
||||
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
nginx-proxy:
|
||||
image: jwilder/nginx-proxy:alpine
|
||||
labels:
|
||||
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"
|
||||
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./data/certs/:/etc/nginx/certs:ro
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
- database
|
||||
environment:
|
||||
config: /usr/local/config/local.edn
|
||||
VIRTUAL_HOST: local.integreat.aws.brycecovertoperations.com
|
||||
VIRTUAL_HOST: local.app.integreatconsult.com
|
||||
database:
|
||||
image: postgres:9-alpine
|
||||
environment:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns auto-ap.db.companies
|
||||
(:require [auto-ap.db.utils :refer [clj->db db->clj get-conn assign-namespace]]
|
||||
(:require [auto-ap.db.utils :refer [assign-namespace clj->db db->clj
|
||||
get-conn]]
|
||||
[auto-ap.entities.companies :as entity]
|
||||
[clojure.edn :as edn]
|
||||
[clojure.java.jdbc :as j]))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
(insert-multi!
|
||||
(for [{:keys [total date invoice-number customer-identifier vendor] :as row} parsed-invoices]
|
||||
(do
|
||||
(println row)
|
||||
|
||||
(assoc row
|
||||
:company-id (::company/id (parse/best-match companies customer-identifier))
|
||||
:imported false
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns auto-ap.db.vendors
|
||||
(:require [auto-ap.db.utils :refer [clj->db db->clj get-conn assign-namespace]]
|
||||
(:require [auto-ap.db.utils :refer [assign-namespace clj->db db->clj
|
||||
get-conn]]
|
||||
[auto-ap.entities.vendors :as entities]
|
||||
[clojure.edn :as edn]
|
||||
[clojure.java.jdbc :as j]))
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
(:require [auto-ap.db.companies :as companies]
|
||||
[auto-ap.routes.utils :refer [wrap-secure wrap-spec]]
|
||||
[auto-ap.entities.companies :as entity]
|
||||
[clojure.spec.alpha :as s]
|
||||
[compojure.core :refer [GET PUT context defroutes
|
||||
wrap-routes]]))
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
[auto-ap.db.reminders :as reminders]
|
||||
[auto-ap.db.vendors :as vendors]
|
||||
[auto-ap.routes.utils :refer [wrap-secure]]
|
||||
[config.core :refer [env]]
|
||||
[clj-http.client :as http]
|
||||
[clj-time.coerce :as c]
|
||||
[clj-time.core :as time]
|
||||
@@ -42,7 +43,7 @@
|
||||
(doseq [{:keys [vendor-name email id]} reminders]
|
||||
(println "Sending email to" email)
|
||||
(ses/send-email :destination {:to-addresses [email]}
|
||||
:source "invoices@mail.integreat.aws.brycecovertoperations.com"
|
||||
:source (:invoice-email env)
|
||||
:message {:subject "Reminder to send invoices"
|
||||
:body {:html (str "<h1>Hello " vendor-name ",</h1><p>This is a reminder to send this week's invoices to us. You can just reply to this email.</p> <p> - Integreat. </p>")
|
||||
:text (str "Hello " vendor-name ",\r\nThis is a reminder to send this week's invoices to us. You can just reply to this email.\r\n - Integreat.")}})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(ns auto-ap.routes.utils
|
||||
(:require [clojure.spec.alpha :as s]
|
||||
[buddy.auth :refer [authenticated?]]))
|
||||
(:require [buddy.auth :refer [authenticated?]]
|
||||
[clojure.spec.alpha :as s]))
|
||||
|
||||
(defn wrap-secure [handler]
|
||||
(fn [request]
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
(ns auto-ap.routes.vendors
|
||||
(:require [auto-ap.db.vendors :as vendors]
|
||||
[auto-ap.routes.utils :refer [wrap-secure wrap-spec]]
|
||||
[auto-ap.entities.vendors :as entity]
|
||||
[clojure.spec.alpha :as s]
|
||||
[auto-ap.routes.utils :refer [wrap-secure wrap-spec]]
|
||||
[compojure.core :refer [GET POST PUT context defroutes
|
||||
wrap-routes]]))
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
aws_access_key_id="AKIAINHACMVQJ6NYD26A"
|
||||
aws_secret_access_key="FwdL4TbIC/5H/4mwhQy4iSI/eSewyPgfS1EEt6tL"
|
||||
domain="integreat.aws.brycecovertoperations.com"
|
||||
invoice_address="invoices@mail.integreat.aws.brycecovertoperations.com"
|
||||
base_url="https://integreat.aws.brycecovertoperations.com"
|
||||
domain="app.integreatconsult.com"
|
||||
invoice_address="invoices@mail.app.integreatconsult.com"
|
||||
base_url="https://app.integreatconsult.com"
|
||||
stage="prod"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
aws_access_key_id="AKIAINHACMVQJ6NYD26A"
|
||||
aws_secret_access_key="FwdL4TbIC/5H/4mwhQy4iSI/eSewyPgfS1EEt6tL"
|
||||
domain="staging.integreat.aws.brycecovertoperations.com"
|
||||
invoice_address="invoices-staging@mail.integreat.aws.brycecovertoperations.com"
|
||||
base_url="https://staging.integreat.aws.brycecovertoperations.com:8443"
|
||||
domain="staging.app.integreatconsult.com"
|
||||
invoice_address="invoices-staging@mail.app.integreatconsult.com"
|
||||
base_url="https://staging.app.integreatconsult.com:8443"
|
||||
stage="staging"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.11.5",
|
||||
"serial": 24,
|
||||
"serial": 26,
|
||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||
"modules": [
|
||||
{
|
||||
@@ -249,7 +249,7 @@
|
||||
"lambda_action.#": "0",
|
||||
"name": "store-prod",
|
||||
"recipients.#": "1",
|
||||
"recipients.2059710502": "invoices@mail.integreat.aws.brycecovertoperations.com",
|
||||
"recipients.1936553836": "invoices@mail.app.integreatconsult.com",
|
||||
"rule_set_name": "default-rule-set",
|
||||
"s3_action.#": "1",
|
||||
"s3_action.4268582484.bucket_name": "integreat-mail-prod",
|
||||
@@ -321,13 +321,13 @@
|
||||
"aws_sns_topic.reminder_topic"
|
||||
],
|
||||
"primary": {
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-prod:760fbd12-3e50-43e1-859e-fefdc0751c34",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-prod:d55e8a84-a979-4bc2-9822-afc2dd047a35",
|
||||
"attributes": {
|
||||
"arn": "arn:aws:sns:us-east-1:679918342773:reminders-prod:760fbd12-3e50-43e1-859e-fefdc0751c34",
|
||||
"arn": "arn:aws:sns:us-east-1:679918342773:reminders-prod:d55e8a84-a979-4bc2-9822-afc2dd047a35",
|
||||
"confirmation_timeout_in_minutes": "1",
|
||||
"endpoint": "https://integreat.aws.brycecovertoperations.com/api/reminders/send",
|
||||
"endpoint": "https://app.integreatconsult.com/api/reminders/send",
|
||||
"endpoint_auto_confirms": "true",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-prod:760fbd12-3e50-43e1-859e-fefdc0751c34",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-prod:d55e8a84-a979-4bc2-9822-afc2dd047a35",
|
||||
"protocol": "https",
|
||||
"raw_message_delivery": "false",
|
||||
"topic_arn": "arn:aws:sns:us-east-1:679918342773:reminders-prod"
|
||||
@@ -369,11 +369,11 @@
|
||||
"type": "aws_caller_identity",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "2018-04-08 23:28:03.708287838 +0000 UTC",
|
||||
"id": "2018-04-10 06:39:11.533275039 +0000 UTC",
|
||||
"attributes": {
|
||||
"account_id": "679918342773",
|
||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||
"id": "2018-04-08 23:28:03.708287838 +0000 UTC",
|
||||
"id": "2018-04-10 06:39:11.533275039 +0000 UTC",
|
||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||
},
|
||||
"meta": {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.11.5",
|
||||
"serial": 24,
|
||||
"serial": 26,
|
||||
"lineage": "9b630886-8cee-a57d-c7a2-4f19f13f9c51",
|
||||
"modules": [
|
||||
{
|
||||
@@ -249,7 +249,7 @@
|
||||
"lambda_action.#": "0",
|
||||
"name": "store-prod",
|
||||
"recipients.#": "1",
|
||||
"recipients.2059710502": "invoices@mail.integreat.aws.brycecovertoperations.com",
|
||||
"recipients.1936553836": "invoices@mail.app.integreatconsult.com",
|
||||
"rule_set_name": "default-rule-set",
|
||||
"s3_action.#": "1",
|
||||
"s3_action.4268582484.bucket_name": "integreat-mail-prod",
|
||||
@@ -315,29 +315,6 @@
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_sns_topic_subscription.send_reminders_to_service": {
|
||||
"type": "aws_sns_topic_subscription",
|
||||
"depends_on": [
|
||||
"aws_sns_topic.reminder_topic"
|
||||
],
|
||||
"primary": {
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-prod:760fbd12-3e50-43e1-859e-fefdc0751c34",
|
||||
"attributes": {
|
||||
"arn": "arn:aws:sns:us-east-1:679918342773:reminders-prod:760fbd12-3e50-43e1-859e-fefdc0751c34",
|
||||
"confirmation_timeout_in_minutes": "1",
|
||||
"endpoint": "https://integreat.aws.brycecovertoperations.com/api/reminders/send",
|
||||
"endpoint_auto_confirms": "true",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-prod:760fbd12-3e50-43e1-859e-fefdc0751c34",
|
||||
"protocol": "https",
|
||||
"raw_message_delivery": "false",
|
||||
"topic_arn": "arn:aws:sns:us-east-1:679918342773:reminders-prod"
|
||||
},
|
||||
"meta": {},
|
||||
"tainted": false
|
||||
},
|
||||
"deposed": [],
|
||||
"provider": "provider.aws"
|
||||
},
|
||||
"aws_sqs_queue.integreat-mail": {
|
||||
"type": "aws_sqs_queue",
|
||||
"depends_on": [
|
||||
@@ -369,11 +346,11 @@
|
||||
"type": "aws_caller_identity",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "2018-04-08 21:28:57.063150249 +0000 UTC",
|
||||
"id": "2018-04-10 06:21:49.828482761 +0000 UTC",
|
||||
"attributes": {
|
||||
"account_id": "679918342773",
|
||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||
"id": "2018-04-08 21:28:57.063150249 +0000 UTC",
|
||||
"id": "2018-04-10 06:21:49.828482761 +0000 UTC",
|
||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||
},
|
||||
"meta": {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.11.5",
|
||||
"serial": 4,
|
||||
"serial": 6,
|
||||
"lineage": "91d10fe0-8033-8778-c202-78d5a81632e8",
|
||||
"modules": [
|
||||
{
|
||||
@@ -249,7 +249,7 @@
|
||||
"lambda_action.#": "0",
|
||||
"name": "store-staging",
|
||||
"recipients.#": "1",
|
||||
"recipients.392613647": "invoices-staging@mail.integreat.aws.brycecovertoperations.com",
|
||||
"recipients.3424326602": "invoices-staging@mail.app.integreatconsult.com",
|
||||
"rule_set_name": "default-rule-set",
|
||||
"s3_action.#": "1",
|
||||
"s3_action.2918620842.bucket_name": "integreat-mail-staging",
|
||||
@@ -321,13 +321,13 @@
|
||||
"aws_sns_topic.reminder_topic"
|
||||
],
|
||||
"primary": {
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-staging:ad5d6da5-c68e-4897-919e-77019cb115dc",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-staging:f21bb21a-f5e9-4bce-afa5-7fa5b1ec8581",
|
||||
"attributes": {
|
||||
"arn": "arn:aws:sns:us-east-1:679918342773:reminders-staging:ad5d6da5-c68e-4897-919e-77019cb115dc",
|
||||
"arn": "arn:aws:sns:us-east-1:679918342773:reminders-staging:f21bb21a-f5e9-4bce-afa5-7fa5b1ec8581",
|
||||
"confirmation_timeout_in_minutes": "1",
|
||||
"endpoint": "https://staging.integreat.aws.brycecovertoperations.com:8443/api/reminders/send",
|
||||
"endpoint": "https://staging.app.integreatconsult.com:8443/api/reminders/send",
|
||||
"endpoint_auto_confirms": "true",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-staging:ad5d6da5-c68e-4897-919e-77019cb115dc",
|
||||
"id": "arn:aws:sns:us-east-1:679918342773:reminders-staging:f21bb21a-f5e9-4bce-afa5-7fa5b1ec8581",
|
||||
"protocol": "https",
|
||||
"raw_message_delivery": "false",
|
||||
"topic_arn": "arn:aws:sns:us-east-1:679918342773:reminders-staging"
|
||||
@@ -369,11 +369,11 @@
|
||||
"type": "aws_caller_identity",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "2018-04-08 23:24:51.436371727 +0000 UTC",
|
||||
"id": "2018-04-10 06:20:31.972433424 +0000 UTC",
|
||||
"attributes": {
|
||||
"account_id": "679918342773",
|
||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||
"id": "2018-04-08 23:24:51.436371727 +0000 UTC",
|
||||
"id": "2018-04-10 06:20:31.972433424 +0000 UTC",
|
||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||
},
|
||||
"meta": {},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"terraform_version": "0.11.5",
|
||||
"serial": 4,
|
||||
"serial": 6,
|
||||
"lineage": "91d10fe0-8033-8778-c202-78d5a81632e8",
|
||||
"modules": [
|
||||
{
|
||||
@@ -249,7 +249,7 @@
|
||||
"lambda_action.#": "0",
|
||||
"name": "store-staging",
|
||||
"recipients.#": "1",
|
||||
"recipients.392613647": "invoices-staging@mail.integreat.aws.brycecovertoperations.com",
|
||||
"recipients.3424326602": "invoices-staging@mail.app.integreatconsult.com",
|
||||
"rule_set_name": "default-rule-set",
|
||||
"s3_action.#": "1",
|
||||
"s3_action.2918620842.bucket_name": "integreat-mail-staging",
|
||||
@@ -346,11 +346,11 @@
|
||||
"type": "aws_caller_identity",
|
||||
"depends_on": [],
|
||||
"primary": {
|
||||
"id": "2018-04-08 22:13:07.617577412 +0000 UTC",
|
||||
"id": "2018-04-10 05:26:29.468970177 +0000 UTC",
|
||||
"attributes": {
|
||||
"account_id": "679918342773",
|
||||
"arn": "arn:aws:iam::679918342773:user/bryce",
|
||||
"id": "2018-04-08 22:13:07.617577412 +0000 UTC",
|
||||
"id": "2018-04-10 05:26:29.468970177 +0000 UTC",
|
||||
"user_id": "AIDAJPUJFTOKO4IRADMV4"
|
||||
},
|
||||
"meta": {},
|
||||
|
||||
Reference in New Issue
Block a user