Add telemetry to Heroku deployments (#1952)

This commit is contained in:
geekup-legodevops 2020-12-02 11:39:12 +07:00 committed by GitHub
parent 8afa900044
commit d6b4a4077f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 7 deletions

View File

@ -17,6 +17,9 @@
"logo": "https://raw.githubusercontent.com/appsmithorg/appsmith/release/static/logo.png",
"success_url": "/",
"stack": "container",
"scripts": {
"postdeploy" : "/analytics.sh"
},
"env": {
"APPSMITH_MONGODB_URI": {
"description": "Your Mongo Database URI",

View File

@ -8,16 +8,16 @@ COPY --from=appsmith/appsmith-editor /var/www/appsmith /var/www/appsmith
RUN apk add --update nginx && \
rm -rf /var/cache/apk/* && \
mkdir -p /tmp/nginx/client-body && \
apk add gettext && apk add bash && \
rm /bin/sh && \
ln -s /bin/bash /bin/sh
apk --no-cache add gettext bash curl
COPY nginx.conf /etc/nginx/nginx.conf
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
ENTRYPOINT ["./bootstrap.sh"]
ENTRYPOINT [ "/bin/sh -c" ]
CMD ["/bootstrap.sh"]

14
deploy/heroku/analytics.sh Executable file
View 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"
}
}'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 33 KiB