Add telemetry to Heroku deployments (#1952)
3
app.json
|
|
@ -17,6 +17,9 @@
|
||||||
"logo": "https://raw.githubusercontent.com/appsmithorg/appsmith/release/static/logo.png",
|
"logo": "https://raw.githubusercontent.com/appsmithorg/appsmith/release/static/logo.png",
|
||||||
"success_url": "/",
|
"success_url": "/",
|
||||||
"stack": "container",
|
"stack": "container",
|
||||||
|
"scripts": {
|
||||||
|
"postdeploy" : "/analytics.sh"
|
||||||
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"APPSMITH_MONGODB_URI": {
|
"APPSMITH_MONGODB_URI": {
|
||||||
"description": "Your Mongo Database URI",
|
"description": "Your Mongo Database URI",
|
||||||
|
|
|
||||||
|
|
@ -8,16 +8,16 @@ COPY --from=appsmith/appsmith-editor /var/www/appsmith /var/www/appsmith
|
||||||
RUN apk add --update nginx && \
|
RUN apk add --update nginx && \
|
||||||
rm -rf /var/cache/apk/* && \
|
rm -rf /var/cache/apk/* && \
|
||||||
mkdir -p /tmp/nginx/client-body && \
|
mkdir -p /tmp/nginx/client-body && \
|
||||||
apk add gettext && apk add bash && \
|
apk --no-cache add gettext bash curl
|
||||||
rm /bin/sh && \
|
|
||||||
ln -s /bin/bash /bin/sh
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY default.conf.template /etc/nginx/conf.d/default.conf.template
|
COPY default.conf.template /etc/nginx/conf.d/default.conf.template
|
||||||
COPY bootstrap.sh .
|
COPY bootstrap.sh /bootstrap.sh
|
||||||
|
COPY analytics.sh /analytics.sh
|
||||||
|
RUN chmod +x /analytics.sh
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
ENTRYPOINT ["./bootstrap.sh"]
|
ENTRYPOINT [ "/bin/sh -c" ]
|
||||||
|
CMD ["/bootstrap.sh"]
|
||||||
|
|
||||||
|
|
|
||||||
14
deploy/heroku/analytics.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
APPSMITH_INSTALLATION_ID=$(curl -s 'https://api64.ipify.org')
|
||||||
|
|
||||||
|
curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \
|
||||||
|
--header 'Content-Type: text/plain' \
|
||||||
|
--data-raw '{
|
||||||
|
"userId": "'"$APPSMITH_INSTALLATION_ID"'",
|
||||||
|
"event": "Installation Success",
|
||||||
|
"data": {
|
||||||
|
"platform": "heroku",
|
||||||
|
"os": "Alpine"
|
||||||
|
}
|
||||||
|
}'
|
||||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 33 KiB |