diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..d5a4de6b7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:20.04 + +ENV TERM xterm +RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime + +RUN apt-get -y update +RUN apt-get install -y nodejs npm curl wget dnsutils certbot --fix-missing + +RUN npm i -g n yarn && n 15.11 + +RUN node -v + +WORKDIR /opt/app + +COPY yarn.lock . +COPY package.json . + +RUN yarn install + +CMD ["sh", "-c", "cp -r node_modules code; cd code; tail -f /dev/null"] + diff --git a/README.md b/README.md index 12f97d998..4bfd978c4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ **is-a-dev** is a service that allows developers to get a sweet-looking `.is-a.dev` domain for their personal websites. +> **[Looking for maintainers](https://github.com/is-a-dev/register/discussions/667)** + ## How do I register? * Fork this project @@ -27,3 +29,6 @@ Please consider donating to help me keep this running forever! ## License This project is under the [GPL-3.0](./LICENSE) license. + +## Team +This Is Owned By [Phenax](https://akshay.is-a.dev), And Managed By [MTGSquad](https://mtg.is-a.dev) diff --git a/default.nix b/default.nix index cf07b33d5..1eec77277 100644 --- a/default.nix +++ b/default.nix @@ -5,10 +5,12 @@ let nixPackages = with pkgs; [ nodejs-15_x yarn - dnsutils - certbot + docker-compose + #dnsutils + #certbot ]; -in pkgs.stdenv.mkDerivation { +in +pkgs.stdenv.mkDerivation { name = "env"; buildInputs = nixPackages; } diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..5b161f929 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3' +services: + dev: + build: + context: . + dockerfile: ./Dockerfile + volumes: + - ./:/opt/app/code diff --git a/docs/maintainers/pr-review.md b/docs/maintainers/pr-review.md new file mode 100644 index 000000000..2737754bd --- /dev/null +++ b/docs/maintainers/pr-review.md @@ -0,0 +1,32 @@ +# Reviewing pull requests +There are a few things you'll need to look out for when reviewing pull requests for domain registrations. This list is not exhaustive and will be updated. + + +### CI errors +A lot of minor issues will be caught in the CI checks +* JSON parsing issues +* Schema issues + +If the CI is failing, tag the user and comment on the pr. + + +### Invalid email/social link +A way to contact the user is important in case we need to inform the users of some changes to the project. +Confirm if the email looks valid or the social user name/link works. +The user should have either an email or a valid social link. + + +### Invalid CNAME +CNAME has to be a hostname. Something like 'example.com'. +People tend to accidentally put a url there instead sometimes like `http://something.com` or `something.com/path`. +Both of those are invalid. + + +### Invalid A +A record has to be an array of ips + + +### Only one record type +Earlier, is-a-dev used to allow for handling https redirections along with CNAME but the way we handle requests has changed since then. +This is why a record file can only contain one record type. Either `CNAME` or `A` or `URL`. + diff --git a/docs/maintainers/publishing-records.md b/docs/maintainers/publishing-records.md new file mode 100644 index 000000000..2c363e8a1 --- /dev/null +++ b/docs/maintainers/publishing-records.md @@ -0,0 +1,11 @@ +# Publishing records +> NOTE: This is only for maintainers with publishing access + +Currently, the records are published using a manual github actions workflow. +When all the PR's are merged and ready, go to `Actions > Publish records` and click on the `Run workflow` button to publish the merged records. + + + +Sometimes it may log an error message while publishing saying some record(s) couldn't be published. +Usually, the cause is related to some conflict while deleting and re-publishing. +In those situations, running the workflow again will fix the issues. diff --git a/domains/aanthr0.json b/domains/aanthr0.json new file mode 100644 index 000000000..3980f2796 --- /dev/null +++ b/domains/aanthr0.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "aanthr0", + "email": "anthromadayt@gmail.com" + }, + "record": { + "URL": "http://bh006.bluefoxhost.com:8215" + } +} diff --git a/domains/coolcodersj.json b/domains/coolcodersj.json index 1a8974d0f..217b5b36d 100644 --- a/domains/coolcodersj.json +++ b/domains/coolcodersj.json @@ -5,6 +5,6 @@ }, "description": "Portfolio", "record": { - "CNAME": "89a354d3-9624-4f42-8f7c-a7e2db1be2cf.repl.co" - } -} \ No newline at end of file + "CNAME": "coolcodersj.github.io" +} +} diff --git a/domains/luanrt.json b/domains/luanrt.json new file mode 100644 index 000000000..2a08a4590 --- /dev/null +++ b/domains/luanrt.json @@ -0,0 +1,11 @@ +{ + "description": "The personal website for LuanRT", + "repo": "https://github.com/luanrt/luanrt.github.io", + "owner": { + "username": "luanrt", + "email": "luan.lrt4@gmail.com" + }, + "record": { + "CNAME": "luanrt.github.io" + } +} diff --git a/domains/molai.json b/domains/molai.json new file mode 100644 index 000000000..1d7d3a263 --- /dev/null +++ b/domains/molai.json @@ -0,0 +1,11 @@ +{ + "description": "This website is a link to my personal developer portfolio.", + "repo": "https://github.com/mtgsquad/mahir-molai", + "owner": { + "username": "mtgsquad", + "email": "mtgissmart@gmail.com" + }, + "record": { + "CNAME": "mahir-molai.pages.dev" + } +} diff --git a/domains/nitesh.json b/domains/nitesh.json new file mode 100644 index 000000000..0184367ce --- /dev/null +++ b/domains/nitesh.json @@ -0,0 +1,11 @@ +{ + "description": "My personal portfolio site", + "repo": "https://github.com/Niteshballa", + "owner": { + "username": "Niteshballa", + "email": "nithesh.mom@gmail.com" + }, + "record": { + "CNAME": "Niteshballa.github.io" + } +} diff --git a/not-a-nerd.json b/domains/not-a-nerd.json similarity index 84% rename from not-a-nerd.json rename to domains/not-a-nerd.json index b90ba517e..67804e42f 100644 --- a/not-a-nerd.json +++ b/domains/not-a-nerd.json @@ -3,7 +3,7 @@ "repo": "https://github.com/0lp/0lp.github.io", "owner": { "username": "0lp", - "email": "not.a.nerd0005@gmail.com", + "email": "not.a.nerd0005@gmail.com" }, "record": { "CNAME": "0lp.github.io" diff --git a/domains/zplusfour.json b/domains/zplusfour.json new file mode 100644 index 000000000..5b5936305 --- /dev/null +++ b/domains/zplusfour.json @@ -0,0 +1,11 @@ +{ + "description": "zplusfour's personal developer website", + "repo": "https://github.com/zplusfour", + "owner": { + "username": "zplusfour", + "email": "zgjoniur@gmail.com" + }, + "record": { + "CNAME": "zplusfour.repl.co" + } +} diff --git a/scripts/certbot.sh b/scripts/certbot.sh index 754f38d2d..f8809e4a1 100755 --- a/scripts/certbot.sh +++ b/scripts/certbot.sh @@ -74,15 +74,16 @@ upload_acme_file() { } reset_acme() { - update_record remove A 'www.is-a.dev' "68.65.123.44"; + update_record remove A 'www' "68.65.123.44"; sleep 1; - update_record add CNAME 'www.is-a.dev' "is-a-dev.github.io"; + update_record add CNAME 'www' "is-a-dev.github.io"; } case "$1" in check) echo "TXT record:: $(dig +noall +answer _acme-challenge.is-a.dev TXT | awk '{print $5}')"; ;; + config_www) update_www_record ;; acme_txt) update_acme_txt_record "$2" ;; acme_file) upload_acme_file "$2" "$3" ;; cert) generate_certificate ;; @@ -95,6 +96,7 @@ esac # Run ./scripts/certbot.sh cert # Run ./scripts/certbot.sh acme_txt "" # Run ./scripts/certbot.sh acme_file "" "" +# Run ./scripts/certbot.sh config_www # Upload cert.pem and privkey.pem contents to SSL > Manage SSL Sites # Run ./scripts/certbot.sh reset