Getting Started
Currently the software is in private beta, but you can get access to it to test it and provide feedback. Just send an email to the developer at: david @ hontecillas.com
This image is only intended for demo or testing purposes. It is built on top of a fat Ubuntu image and contains everything SendRules needs to run:
- a Postgres database
- a runn SendRules API, a postgres database, and the UI to configure, add test recipients, and so one..
Currently the latest beta is: dhontecillas/betasrules_standalone:latest
You can launch it with:
docker run --name sendrules_demo \
-p 8080:80 \
-e SENDRULES_ADMIN_STATICKEY='JvYAVMYRjJX8X6MhvT4ILHByw6C7CyPf' \
dhontecillas/betasrules_standalone:latest
And point your browser to 127.0.0.1:8080 , to access the landing page.
The instance comes with a preconfigured user: sendrules@example.com
with
password test1234
.
Since there is no email sender configured, once you try to register an mail, you will be able to spot a message in the console output with an activation link (mail is logged to the console):
{"duration":0,"file":"/go/pkg/mod/github.com/dhontecillas/hfw@v0.0.0-20230215083441-2ab329c17587/pkg/ginfw/obs.go:92","ip":"172.17.0.1","level":"info","method":"GET","msg":"Request","path":"/app/wapi/csrf_token","reqid":"01876731-28c7-be1e-6836-782cc8561f52","reqtime":"2023-04-09T20:04:47+02:00","size":45,"status":200,"time":"2023-04-09T20:04:47+02:00"}
Email SENT: To: "your_email@gmail.com" <your_email@gmail.com>, From: "No Reply" <noreply@example.com>, Subject: Activate your account
, Text: Activate your account at http://localhost:8081/app/users/activate?token=4a9825f8592193a631d00aabe0dcc4025a13c1cc55dad28a5a515a37a1847d9c
{"duration":67,"file":"/go/pkg/mod/github.com/dhontecillas/hfw@v0.0.0-20230215083441-2ab329c17587/pkg/ginfw/obs.go:92","ip":"172.17.0.1","level":"info","method":"POST","msg":"Request","path":"/app/wapi/users/register","reqid":"01876731-28ca-7be5-e3f4-954d769e9b8f","reqtime":"2023-04-09T20:04:47+02:00","size":16,"status":200,"time":"2023-04-09T20:04:47+02:00"}
Visit the link to activate the user, and you will be ready to start using the interface.
By providing some extra vars when running the docker container, you can make it use sendgrid to send the registration emails.
SENDRULES_MAILER_PREFERRED
:sendgrid
SENDRULES_SENDGRID_KEY
:Your sendgrid key
SENDRULES_MAILER_FROM_EMAIL
:your_sendgrid_validated_from_email@example.com
putting it all together:
docker run --name sendrules_demo \
-p 8080:80 \
-e SENDRULES_ADMIN_STATICKEY='JvYAVMYRjJX8X6MhvT4ILHByw6C7CyPf' \
-e SENDRULES_MAILER_PREFERRED=sendgrid \
-e SENDRULES_SENDGRID_KEY='Your sendgrid key' \
-e SENDRULES_MAILER_FROM_EMAIL=your_sendgrid_validated_from_email@example.com` \
dhontecillas/betasrules_standalone:latest
If you take a look at how we started the container you see that we
provided a SENDRULES_ADMIN_STATICKEY
environment var with this
string: JvYAVMYRjJX8X6MhvT4ILHByw6C7CyPf
is a way to enable the admin
api that allows you to create activated users through and API call.
curl -X POST \
-H 'Content-Type: application/json' \
-H 'X-Api-Key: JvYAVMYRjJX8X6MhvT4ILHByw6C7CyPf' \
--data '{"email": "sendrules@example.com", "password": "test1234"}' \
http://localhost:8080/adm/owner
Why is it called an owner
? we do not use the term user
for being too
generic, so we have owner
s, that are complete separate accounts, and
we have [recipients](recipients)
that will map to “users” on other systems.
After this call, you can go to the http://localhost:8080
and login with
the newly created user.
The Production Ready image is a Linux Alpine based image, much more lightweight, but it must be run with configuration options to access the database where it will store the data.