Skip to content

Commit 915cb1e

Browse files
authored
Merge pull request #1138 from DataUSA/develop
Deploy App
2 parents a19b01a + 63510fd commit 915cb1e

File tree

6 files changed

+4494
-4457
lines changed

6 files changed

+4494
-4457
lines changed

helm/development.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,23 @@ serviceAccount:
7474

7575
configMap:
7676
CANON_API: "https://app-dev.datausa.io"
77-
CANON_CMS_CUBES: "https://elpaso-api.datausa.io/"
77+
CANON_CMS_CUBES: "https://fargo-api.datausa.io/"
7878
CANON_CMS_ENABLE: "true"
7979
CANON_CMS_FORCE_HTTPS: "true"
8080
CANON_CMS_GENERATOR_TIMEOUT: "600000"
8181
CANON_CMS_LOGGING: "true"
8282
CANON_CMS_MINIMUM_ROLE: "1"
8383
CANON_CMS_REQUESTS_PER_SECOND: "60"
8484
CANON_CONST_CART: "datausa-cart-v3"
85-
CANON_CONST_CUBE: "https://elpaso-api.datausa.io/"
85+
CANON_CONST_CUBE: "https://fargo-api.datausa.io/"
8686
CANON_CONST_TESSERACT: "https://api-ts-dev.datausa.io/"
8787
CANON_DB_NAME: "datausa-cms-21-dev"
8888
CANON_DB_USER: "postgres"
8989
CANON_GEOSERVICE_API : "https://geoservice.datausa.io/api/"
9090
CANON_GOOGLE_ANALYTICS: "UA-70325841-1"
9191
CANON_LANGUAGES: "en"
9292
CANON_LANGUAGE_DEFAULT: "en"
93-
CANON_LOGICLAYER_CUBE: "https://elpaso-api.datausa.io/"
93+
CANON_LOGICLAYER_CUBE: "https://fargo-api.datausa.io/"
9494
CANON_LOGICLAYER_SLUGS: "true"
9595
CANON_LOGINS: "true"
9696
GA_KEYFILE: "/app/google/googleAnalyticsKey.json"
@@ -120,7 +120,12 @@ ingress:
120120
paths:
121121
- /
122122
- /ws
123+
- host: fargo-app.datausa.io
124+
paths:
125+
- /
126+
- /ws
123127
tls:
124128
- secretName: canon-site-tls
125129
hosts:
126130
- app-dev.datausa.io
131+
- fargo-app.datausa.io

helm/fargo.yaml

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
image:
2+
pullPolicy: Always
3+
4+
imagePullSecrets:
5+
- name: github
6+
7+
replicaCount: 2
8+
9+
autoscaling:
10+
enabled: true
11+
minReplicas: 1
12+
maxReplicas: 5
13+
targetCPUUtilizationPercentage: 120
14+
targetMemoryUtilizationPercentage: 120
15+
16+
resources:
17+
requests:
18+
cpu: 1000m
19+
memory: 3Gi
20+
ephemeral-storage: 512Mi
21+
22+
livenessProbe:
23+
# enabled: false
24+
failureThreshold: 3
25+
httpGet:
26+
path: /
27+
port: 3300
28+
scheme: HTTP
29+
initialDelaySeconds: 40
30+
periodSeconds: 30
31+
timeoutSeconds: 30
32+
successThreshold: 1
33+
34+
readinessProbe:
35+
# enabled: false
36+
failureThreshold: 3
37+
httpGet:
38+
path: /
39+
port: 3300
40+
scheme: HTTP
41+
initialDelaySeconds: 40
42+
periodSeconds: 30
43+
timeoutSeconds: 30
44+
successThreshold: 2
45+
46+
volumeMountsEnabled: true
47+
48+
volumeMounts:
49+
- name: google-analytics-volumen
50+
mountPath: /app/google
51+
52+
volumesEnabled: true
53+
54+
volumes:
55+
- name: google-analytics-volumen
56+
configMap:
57+
name: google-analytics
58+
59+
service:
60+
type: ClusterIP
61+
port: 3300
62+
63+
serviceAccount:
64+
# Specifies whether a service account should be created
65+
create: false
66+
# Annotations to add to the service account
67+
annotations: {}
68+
# The name of the service account to use.
69+
# If not set and create is true, a name is generated using the fullname template
70+
name: ""
71+
72+
# persistentVolume:
73+
# namespace: nginx-ingress-canon
74+
# storageClass:
75+
# accessModes:
76+
# - ReadWriteMany
77+
# storage: 300Gi
78+
# storageClassName:
79+
# persistentVolumeReclaimPolicy: Retain
80+
# nfs:
81+
# path: /opt/sfw
82+
# readOnly: false
83+
84+
configMap:
85+
CANON_API: "https://fargo-app.datausa.io"
86+
CANON_CMS_CUBES: "https://fargo-api.datausa.io/"
87+
CANON_CMS_ENABLE: "false"
88+
CANON_CMS_FORCE_HTTPS: "true"
89+
CANON_CMS_GENERATOR_TIMEOUT: "1200000"
90+
CANON_CMS_LOGGING: "true"
91+
CANON_CMS_MINIMUM_ROLE: "1"
92+
CANON_CMS_REQUESTS_PER_SECOND: "40"
93+
CANON_CONST_CART: "datausa-cart-v3"
94+
CANON_CONST_CUBE: "https://fargo-api.datausa.io/"
95+
CANON_CONST_TESSERACT: "https://fargo-api-ts.datausa.io/"
96+
CANON_DB_NAME: "datausa-cms-21-fargo"
97+
CANON_DB_USER: "prod"
98+
CANON_GEOSERVICE_API : "https://geoservice.datausa.io/api/"
99+
CANON_GOOGLE_ANALYTICS: "UA-70325841-1"
100+
CANON_LANGUAGES: "en"
101+
CANON_LANGUAGE_DEFAULT: "en"
102+
CANON_LOGICLAYER_CUBE: "https://fargo-api.datausa.io/"
103+
CANON_LOGICLAYER_SLUGS: "true"
104+
CANON_LOGINS: "true"
105+
GA_KEYFILE: "/app/google/googleAnalyticsKey.json"
106+
107+
ingress:
108+
enabled: true
109+
annotations:
110+
cert-manager.io/cluster-issuer: "letsencrypt-prod"
111+
acme.cert-manager.io/http01-edit-in-place: "true"
112+
ingress.kubernetes.io/ssl-redirect: "false"
113+
nginx.org/client-max-body-size: "512m"
114+
nginx.org/proxy-buffers: "8 12m"
115+
nginx.org/proxy-buffer-size: "12m"
116+
nginx.org/proxy-busy-buffers-size: "32m"
117+
nginx.org/proxy-connect-timeout: "600s"
118+
nginx.org/proxy-read-timeout: "600s"
119+
nginx.org/proxy-send-timeout: "600s"
120+
# nginx.org/websocket-services: "canon-site-fargo"
121+
nginx.org/location-snippets: |
122+
add_header Access-Control-Allow-Origin *;
123+
add_header Access-Control-Allow-Credentials true;
124+
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
125+
# add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type";
126+
127+
# Define the cache key
128+
# set $cache_key "$host$request_uri";
129+
set $cache_key "$served_host$request_uri";
130+
131+
set $no_use_cache 1;
132+
if ($request_uri ~* "/profile/(geo|soc|naics|napcs|university|cip)") {
133+
set $no_use_cache 0;
134+
}
135+
if ($request_uri ~* "/api/profile/\?slug=(geo|soc|naics|napcs|university|cip)") {
136+
set $no_use_cache 0;
137+
}
138+
if ($request_uri ~* "^/$") {
139+
set $no_use_cache 0;
140+
}
141+
if ($request_uri ~* "/(assets|images|topojson|icons)") {
142+
set $no_use_cache 0;
143+
}
144+
145+
proxy_cache fargo-cache;
146+
proxy_cache_bypass $no_use_cache;
147+
proxy_no_cache $no_use_cache;
148+
149+
proxy_cache_key $cache_key;
150+
proxy_cache_methods GET HEAD;
151+
proxy_cache_valid 200 365d;
152+
proxy_ignore_headers Vary;
153+
proxy_hide_header Vary;
154+
155+
# Add the custom header with the cache key
156+
add_header X-Cache-Key $cache_key;
157+
add_header Cache-Control "public, max-age=31536000";
158+
add_header Referrer-Policy "no-referrer";
159+
add_header X-Cache-Date $upstream_http_date;
160+
add_header X-Cache-Status $upstream_cache_status;
161+
162+
# Other proxy settings (don't uncomment, doesn't work with cert-manager.io)
163+
# proxy_set_header Host $host;
164+
# proxy_set_header X-Real-IP $remote_addr;
165+
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
166+
# proxy_set_header X-Forwarded-Proto $scheme;
167+
nginx.org/server-snippets: |
168+
if ($http_x_forwarded_proto = 'http') {
169+
return 308 https://$host$request_uri;
170+
}
171+
className: nginx-fargo
172+
hosts:
173+
- host: fargo-app.datausa.io
174+
paths:
175+
- /
176+
- /ws
177+
- host: datausa.io
178+
paths:
179+
- /
180+
- /ws
181+
# - host: test.datausa.io
182+
# paths:
183+
# - /
184+
# - /ws
185+
tls:
186+
- secretName: canon-site-fargo-prod-tls
187+
hosts:
188+
- fargo-app.datausa.io
189+
- datausa.io
190+
# - test.datausa.io

scripts/candidateImage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const predefined = {
2222
"George Walker Bush": "George W. Bush",
2323
"Rafael Edward Ted Cruz": "Ted Cruz",
2424
"Joseph R Biden Jr.": "Joe Biden",
25-
"James Mac Warren": "James Warren"
25+
"James Mac Warren": "James Warren",
26+
"Robert Kennedy":"Robert F. Kennedy Jr."
2627
};
2728

2829
const matchWords = [

scripts/wikiCandidates.js

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)