- HTML 44.8%
- Go 30.7%
- CSS 11.9%
- JavaScript 11.9%
- Shell 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| internal/store | ||
| static | ||
| systemd | ||
| templates | ||
| third_party | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| install-service.sh | ||
| main.go | ||
| prymo | ||
| README.md | ||
| styles.css | ||
prymo
Marketing site and admin portal for Prymo Automotive. Go + SQLite; all content is entered at /login.
go build -o prymo . # build (Go 1.25+)
./prymo # run on :7755
sudo bash install-service.sh # install+enable systemd unit, prints admin password
./third_party/tailwindcss -i styles.css -o static/styles.css --minify # rebuild css after editing styles.css or a template
Deploying an update
The first install uses sudo bash install-service.sh. For later updates, do
not run the installer again and do not replace data/; that directory holds
the live SQLite database and uploaded gallery/promotion images.
From the existing checkout on the deployment box:
cd /path/to/prymo
git pull --ff-only origin main
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o prymo.new .
mv prymo.new prymo
sudo systemctl restart prymo
sudo systemctl status prymo --no-pager
The schema upgrades itself when the new binary starts. If the deployment box
does not have Git, build the Linux binary locally, upload it along with
static/, and replace the old binary before restarting the service.
Two env vars, both optional, prefixed so they can't collide with anything else on the box:
PRYMO_PORT 7755 listen port
PRYMO_ADMIN_PASS (generated) login password, printed once to the log
Paths are fixed: the sqlite file is data/prymo.db, uploaded images go to data/uploads, and static/ is served at /. There is one login, username admin. PRYMO_ADMIN_PASS is read only while the users table is empty, i.e. on a first run.
The visitor counter identifies a browser with a one-year cookie. Its IP address, user agent, referrer, first/last visit, and page-view count are kept in SQLite and shown only in the authenticated admin portal. Include this tracking in the site's privacy notice if one is required for the business or location.
install-service.sh writes both vars into the unit file (mode 600); override either by exporting it before running the installer. To reset the login: sqlite3 data/prymo.db "DELETE FROM users;", restart, then read the new password from journalctl -u prymo.