Contact Form for ojmaster's CafeBlues applications made in nodejs and using nodemailer
1.7K
A simple contact form application that allows users to send emails to a specified recipient using nodemailer.
To run the ContactForm app, you can use the following Docker command:
docker run [OPTIONS] ojmaster/contactform:latest
| Option | Description | Example |
|---|---|---|
--name | Name of the container | --name ContactForm |
-v | Mount a volume to the container | -v /your/path/to/favicon.ico:/app/public/images/favicon.ico |
-p | Port mapping | -p 3000:3000 or -p xxxx:3000 |
-e | Set environment variables | See Environment Variables table |
--env-file | Use a .env file to set environment variables | --env-file ./.env |
-d | Detach from the container when starting | |
--restart | Set the restart policy | --restart unless-stopped |
| Variable | Description | Required |
|---|---|---|
SMTP_HOST | SMTP server url | true |
SMTP_PORT | SMTP server port | true |
SMTP_LOGIN | SMTP login credentials | true |
SMTP_API_KEY | SMTP API key | true |
SENDER_EMAIL | Email address of the sender | true |
RECIPIENT_EMAIL | Email address of the recipient | true |
BASE_URL | Base URL of the application (optional) | Optional, only needed when using a reverse proxy to host the application on a subdirectory |
Here is an example command that sets all the required environment variables and starts the container in detached mode with a restart policy:
docker run -p 9825:3000 --name ContactForm --env-file ./.env -d --restart unless-stopped ojmaster/contactform:latest
Note that you can replace the ./.env file with your own file containing the environment variables. Alternatively, you can set the environment variables individually using the -e flag.
Content type
Image
Digest
sha256:aa5041f63…
Size
382.2 MB
Last updated
11 months ago
docker pull ojmaster/contactform