diff --git a/README.md b/README.md index af34bb8..6ab375a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,51 @@ # pontus-mail Landing page for p0ntus mail + +# Self hosting +## Traditional Node.js +1. Clone the repo + ```bash + git clone https://github.com/ihatenodejs/pontus-mail.git + cd pontus-mail + ``` +2. Copy the example `docker-compose.yml` + ```bash + mv docker-compose.yml.example docker-compose.yml + ``` +3. Make the `self` script executable + ```bash + chmod +x self + ``` +4. Use `self` script to serve files into `public/` directory + ```bash + ./self start + ``` + +You will now have to use a server (NGINX, Apache2, etc.) to serve files from the `./public` directory. + +Make changes from the `./src` directory, and `self` will copy them over. +## With Docker +You can also use Docker to self-host pontus-mail's frontend. Make sure you have docker-compose or docker-compose-plugin installed on your system. +1. Clone the repo + ```bash + git clone https://github.com/ihatenodejs/pontus-mail.git + cd pontus-mail + ``` +2. Copy the example `docker-compose.yml` + ```bash + mv docker-compose.yml.example docker-compose.yml + ``` +3. Make the `self` script executable + ```bash + chmod +x self + ``` +4. Start Docker containers + ```bash + docker compose up -d + ``` +5. Use `self` script to serve files into `public/` directory + ```bash + ./self start + ``` + +You will now have a fully functioning NGINX server, serving the pontus-mail website from the `./public` directory. Make your changes in the `./src` directory, if any. \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..4ef018b --- /dev/null +++ b/index.html @@ -0,0 +1,62 @@ + + + + + + p0ntus mail + + + + + + + +
+

p0ntus mail.

+

simple, mindful, secure email.

+ Where can I direct your request? +
+
+

If you are a current user

+ Webmail +
+

If you aren't a current user

+ Register +
+ + + \ No newline at end of file diff --git a/self b/self new file mode 100755 index 0000000..390bc08 --- /dev/null +++ b/self @@ -0,0 +1,57 @@ +#!/bin/bash + +SC_VERSION=1.0.0 +SC_CODENAME="wormhole" +COLOR_RESET="\033[0m" +COLOR_GREEN="\033[1;32m" +COLOR_RED="\033[1;31m" +COLOR_YELLOW="\033[1;33m" +COLOR_BLUE="\033[1;34m" +COLOR_CYAN="\033[1;36m" + +function start() { + if [ ! -d "src" ]; then + echo -e "${COLOR_RED}src directory not found, cannot continue${COLOR_RESET}" + exit 1 + fi + + mkdir -p public + + cp -r src/* public/ + echo -e "${COLOR_GREEN}Created public dir and copied files successfully${COLOR_RESET}" +} + +function stop() { + if [ -d "public" ]; then + rm -rf public + echo -e "${COLOR_GREEN}Deleted public directory${COLOR_RESET}" + else + echo -e "${COLOR_RED}No public directory to delete${COLOR_RESET}" + fi +} + +function help() { + echo -e "${COLOR_GREEN}self version:${COLOR_RESET} ${COLOR_BLUE}${SC_VERSION} ${SC_CODENAME}${COLOR_RESET}" + echo -e "${COLOR_BLUE}Usage:${COLOR_RESET} ./self [command]\n" + echo -e "${COLOR_YELLOW}Commands:${COLOR_RESET}" + echo -e " ${COLOR_CYAN}help${COLOR_RESET} Shows this help message." + echo -e " ${COLOR_CYAN}start${COLOR_RESET} Copies files to public directory." + echo -e " ${COLOR_CYAN}stop${COLOR_RESET} Removes public directory." +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + help) + help + ;; + *) + echo -e "${COLOR_RED}Invalid command: $1\n${COLOR_RESET}" + help + exit 1 + ;; +esac \ No newline at end of file