This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/README.md
T
2026-05-02 19:48:50 +02:00

174 lines
3.4 KiB
Markdown

# Novarix Networks Website
Static Tailwind CSS website for `Novarix Networks`.
The site is designed for this workflow:
- edit locally
- push changes to your internal `Gitea` repo
- run one deploy command on the Ubuntu Nginx VM
- serve the site from `/var/www/novarixnet.com/public`
- expose it publicly through `Nginx Proxy Manager`
## Project Structure
- `public/index.html` main website content
- `public/styles.css` generated CSS served by Nginx after `npm run build`
- `public/script.js` small navigation and reveal animation script
- `public/assets/` logo and favicon assets
- `src/styles.css` Tailwind source file
- `EDITING.md` simple guide for changing content
- `deploy.sh` server-side update script
- `ops/nginx/novarixnet.com.conf.example` example Nginx config
## Important Tailwind Note
This project uses the current Tailwind CSS v4 CLI setup:
```bash
npm install tailwindcss @tailwindcss/cli
```
Tailwind builds `src/styles.css` into this generated file:
```text
public/styles.css
```
Nginx serves the compiled `public/styles.css` file. It does not understand Tailwind directly, so the build step must run after the repo is pulled.
## Ubuntu 24.04 Nginx Server Setup
Install Nginx and Git:
```bash
sudo apt update
sudo apt install -y nginx git
sudo systemctl enable nginx
sudo systemctl start nginx
```
Install Node.js 20 or newer. NodeSource currently supports Ubuntu 24.04 with Node 22, which is a good choice for this server:
```bash
sudo apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
sudo apt install -y nodejs
```
After installing, confirm:
```bash
node --version
npm --version
```
Create the web directory and make your normal sudo user the owner:
```bash
sudo mkdir -p /var/www
sudo chown -R $USER:$USER /var/www
```
Clone the Gitea repo:
```bash
git clone http://10.10.10.11:3000/kismet.hasanaj/novarix-networks-homepage.git /var/www/novarixnet.com
```
Install the website dependencies and build the CSS:
```bash
cd /var/www/novarixnet.com
npm install --no-package-lock
npm run build
```
Use the Nginx config in:
```text
ops/nginx/novarixnet.com.conf.example
```
The important Nginx root is:
```nginx
root /var/www/novarixnet.com/public;
```
Enable the site:
```bash
sudo ln -s /etc/nginx/sites-available/novarixnet.com /etc/nginx/sites-enabled/
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t
sudo systemctl reload nginx
```
## Updating The Live Website
After pushing changes to Gitea from your local machine, SSH into the Nginx VM and run:
```bash
cd /var/www/novarixnet.com
./deploy.sh
```
The deploy script does this:
```bash
git pull origin main
npm install --no-package-lock
npm run build
sudo nginx -t
sudo systemctl reload nginx
```
If the script is not executable yet, run this once:
```bash
chmod +x /var/www/novarixnet.com/deploy.sh
```
## Editing The Site
For simple content changes, edit:
```text
public/index.html
```
For visual styling changes, edit:
```text
src/styles.css
```
The quick editing guide is:
```text
EDITING.md
```
## Nginx Proxy Manager
Create a proxy host:
- Domain: `novarixnet.com`
- Scheme: `http`
- Forward hostname/IP: private IP of the Ubuntu Nginx VM
- Forward port: `80`
- SSL: request certificate and force SSL
- Enable `Block Common Exploits`
## Canonical Domain
Recommended primary domain:
```text
novarixnet.com
```
Redirect the other Novarix domains to the primary domain once DNS and Nginx Proxy Manager are ready.