Finally a simple interface for domain names https://happydomain.org/
Go to file
nemunaire 8aa6f933a3 Rename project happyDomain 2021-12-31 15:52:15 +01:00
actions Rename project happyDomain 2021-12-31 15:52:15 +01:00
admin Modular authentication 2021-12-16 20:04:10 +01:00
api Redirect to external login form 2021-12-16 20:04:10 +01:00
config Redirect to external login form 2021-12-16 20:04:10 +01:00
forms Move all related forms struct to forms package 2020-12-29 17:00:06 +01:00
generators Fix icon generation script to handle deeper directories 2020-12-29 17:03:13 +01:00
internal/app Refactor to use gin-gonic 2021-06-09 22:51:13 +02:00
model Modular authentication 2021-12-16 20:04:10 +01:00
providers Rename project happyDomain 2021-12-31 15:52:15 +01:00
services Rename project happyDomain 2021-12-31 15:52:15 +01:00
storage Rename project happyDomain 2021-12-31 15:52:15 +01:00
ui Rename project happyDomain 2021-12-31 15:52:15 +01:00
utils Rename project happyDomain 2021-12-31 15:52:15 +01:00
.dockerignore CI: Build container for arm, and speed-up arm64 generation 2020-12-29 17:06:12 +01:00
.drone-manifest.yml Add build on amd64 + Docker manifest publishing 2020-12-29 17:06:11 +01:00
.drone.yml CI: Force docker image version 2021-12-16 20:04:10 +01:00
.gitignore Change project name from libredns to happydns.org 2020-05-11 00:18:49 +02:00
Dockerfile chore(deps): update alpine docker tag to v3.15 2021-12-16 20:04:10 +01:00
Dockerfile-builded Pass hadolint 2021-12-16 20:04:10 +01:00
LICENSE Rename project happyDomain 2021-12-31 15:52:15 +01:00
README.md Rename project happyDomain 2021-12-31 15:52:15 +01:00
generate.go Provider's icons 2021-07-05 18:01:43 +02:00
go.mod chore(deps): update module github.com/miekg/dns to v1.1.45 2021-12-23 09:08:01 +00:00
go.sum chore(deps): update module github.com/miekg/dns to v1.1.45 2021-12-23 09:08:01 +00:00
hadmin.sh Add new tools to interract with admin api 2021-01-10 17:01:05 +01:00
main.go Rename project happyDomain 2021-12-31 15:52:15 +01:00
renovate.json Add renovate.json 2021-08-01 09:47:17 +00:00

README.md

happyDomain

Finally a simple, modern and open source interface for domain name.

It consists of a HTTP REST API written in Golang (primarily based on https://github.com/miekg/dns) with a nice web interface written in Vue.js. It runs as a single stateless Linux binary, backed by a database (currently: LevelDB, more to come soon).

Features

TODO

Building

Dependencies

In order to build the happyDomain project, you'll need the following dependencies:

  • go at least version 1.16
  • nodejs tested with version 14.4.0
  • yarn tested with version 1.22.4

Instructions

  1. First, you'll need to prepare the frontend, by installing the node modules dependencies:
yarn --cwd ui install
  1. Then, generates assets files used by Go code:
go generate git.happydns.org/happydns/ui
go generate git.happydns.org/happydns
  1. Finaly, build the Go code:
go build -v

This last command will create a binary happydns you can use standalone.

Install at home

The binary comes with sane default options to start with. You can simply launch the following command in your terminal:

./happydns

After some initializations, it should show you:

Admin listening on ./happydns.sock
Ready, listening on :8081

Go to http://localhost:8081/ to start using happyDomain.

Database configuration

By default, the LevelDB storage engine is used. You can change the storage engine using the option -storage-engine other-engine.

The help command ./happydns -help can show you the available engines. By example:

-storage-engine value
	Select the storage engine between [leveldb mysql] (default leveldb)

LevelDB

LevelDB is a small embedded key-value store (as SQLite it doesn't require an additional daemon to work).

-leveldb-path string
	Path to the LevelDB Database (default "happydns.db")

By default, a new directory is created near the binary, called happydns.db. This directory contains the database used by the program. You can change it to a more meaningful/persistant path.

Persistant configuration

The binary will automatically look for some existing configuration files:

  • ./happydns.conf in the current directory;
  • $XDG_CONFIG_HOME/happydns/happydns.conf;
  • /etc/happydns.conf.

Only the first file found will be used.

It is also possible to specify a custom path by adding it as argument to the command line:

./happydns /etc/happydns/config

Config file format

Comments line has to begin with #, it is not possible to have comments at the end of a line, by appending # followed by a comment.

Place on each line the name of the config option and the expected value, separated by =. For example:

storage-engine=leveldb
leveldb-path=/var/lib/happydns/db/

Environment variables

It'll also look for special environment variables, beginning with HAPPYDNS_.

You can achieve the same as the previous example, with the following environment variables:

HAPPYDNS_STORAGE_ENGINE=leveldb
HAPPYDNS_LEVELDB_PATH=/var/lib/happydns/db/

You just have to replace dash by underscore.

Development environment

If you want to contribute to the frontend, instead of regenerating the frontend assets each time you made a modification (with go generate), you can use the development tools:

In one terminal, run happydns with the following arguments:

./happydns -dev http://127.0.0.1:8080

In another terminal, run the node part:

yarn --cwd ui run serve

With this setup, static assets integrated inside the go binary will not be used, instead it'll forward all requests for static assets to the node server, that do dynamic reload, etc.