diff --git a/.gcloudignore b/.gcloudignore index 45fc66c..d7c2250 100644 --- a/.gcloudignore +++ b/.gcloudignore @@ -28,4 +28,4 @@ hugo-mx-gateway helm screenshots samples -bin +./bin diff --git a/README.md b/README.md index 3a213c3..f1ec9b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ ![](https://img.shields.io/github/license/rchakode/hugo-mx-gateway.svg?label=License) -[![Actions Status](https://github.com/rchakode/hugo-mx-gateway/workflows/Build/badge.svg)](https://github.com/rchakode/`hugo-mx-gateway`/actions) -![](https://img.shields.io/docker/pulls/rchakode/hugo-mx-gateway.svg?label=Docker%20Pulls) +[![Actions Status](https://github.com/rchakode/hugo-mx-gateway/workflows/Build/badge.svg)](https://github.com/rchakode/hugo-mx-gateway/actions) # Overview In a nutshell, `hugo-mx-gateway` provides a RESTful POST endpoint for static contact/demo request pages. It's a simple, yet a powerful tool built for this only-designated purpose. @@ -38,7 +37,7 @@ This project, namely `hugo-mx-gateway`, is meant to provide a RESTful API that a `hugo-mx-gateway` is built upon a simple request handling workflow: * Create an HTML form with a POST action pointing towards the `hugo-mx-gateway` service. This service is a RESTful POST endpoint backed by an application easily deployable on [Google App Engine](https://cloud.google.com/appengine), Kubernetes, or Docker. -* For each user request, `hugo-mx-gateway` automatically retrieves information submitted by the user (email, subject, message details...), then **generates and sends** a **templated email** to the user-provided email address, while **bcc**ing a copy of that email to an address that you can define for internal tracking and follow up. +* For each user request, `hugo-mx-gateway` automatically retrieves information submitted by the user (email, subject, message details...), then **generates and sends** a **templated email** (based on [Go Template](https://golang.org/pkg/text/template/)) to the user-provided email address, while **bcc**ing a copy of that email to an address that you can define for internal tracking and follow up. * Once a request is processed (upon success or failure), `hugo-mx-gateway` handles the reply back towards the calling static page by redirecting the browser to the origin page with additional URL parameters describing the completion status of the processing (e.g. `/contact.html?status=success&message=request%20submitted`). The parameters can then be easily retrieved and shown to the user, e.g. with a few lines of Javascript within the static page. * The project is shipped with a sample HTML form intending to cover a basic use case of contact and demo requests. That said, this is a open source software, so you're free to adapt it for your specific use cases. @@ -71,7 +70,7 @@ This requires to have an active GCP account and [Google Cloud SDK](https://cloud ``` make deploy-gcp ``` -* Check that `hugo-mx-gateway` is up and functioning +* Check that `hugo-mx-gateway` is up and working ``` curl https://PROJECT-ID.REGION.r.appspot.com/healthz ``` @@ -110,7 +109,7 @@ An instance of `hugo-mx-gateway` can be quickly started on any machine running D ``` $ docker run -d \ --publish 8080:8080 \ - --name '`hugo-mx-gateway`' \ + --name 'hugo-mx-gateway' \ -e SMTP_SERVER_ADDR="smtp.example.com:465" \ -e SMTP_VERITY_CERT=true \ -e SMTP_CLIENT_USERNAME="postmaster@example.com" \ @@ -119,7 +118,7 @@ An instance of `hugo-mx-gateway` can be quickly started on any machine running D -e CONTACT_REPLY_BCC_EMAIL="contact@example.com" \ -e DEMO_URL="https://demo.example.com/" \ -e ALLOWED_ORIGINS="127.0.0.1,example.com" \ - rchakode/`hugo-mx-gateway` + rchakode/hugo-mx-gateway ``` * Check that the container is up and functionning. @@ -139,8 +138,8 @@ The integration works as follows: * Copy the HTML form content in your target **Hugo HTML template**. * Modify the `