initial commit
This commit is contained in:
parent
642a26b7d6
commit
22296f2f26
49
README.md
49
README.md
@ -1,2 +1,51 @@
|
|||||||
# pontus-mail
|
# pontus-mail
|
||||||
Landing page for p0ntus 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.
|
62
index.html
Normal file
62
index.html
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>p0ntus mail</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: 'Playfair Display', serif;
|
||||||
|
background-color: #fdf6e3;
|
||||||
|
color: #333;
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 3rem;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
color: #7d7d7d;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-family: 'Great Vibes', cursive;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
display: block;
|
||||||
|
margin-top: 1rem;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
padding: 2rem;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
.text-start {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<h1>p0ntus mail.</h1>
|
||||||
|
<h3>simple, mindful, secure email.</h3>
|
||||||
|
<i>Where can I direct your request?</i>
|
||||||
|
<hr>
|
||||||
|
<div class="text-start">
|
||||||
|
<p><i>If you are a current user</i></p>
|
||||||
|
<a href="/webmail" class="btn bg-dark text-white">Webmail</a>
|
||||||
|
<hr>
|
||||||
|
<p><i>If you aren't a current user</i></p>
|
||||||
|
<a href="/register" class="btn bg-dark text-white">Register</a>
|
||||||
|
</div>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
57
self
Executable file
57
self
Executable file
@ -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
|
Reference in New Issue
Block a user