A Node.js (Typescript) app to check for new subdomains and notify if found any
To be able to install SubNode you need Docker, Docker Compose and Git installed.
First clone this repository using this command:
git clone https://github.com/aigic8/subnode
Alongside subnode
dir, create a directory called config
and inside that create a dir called subnode
. Copy and rename subnode.sample.json
to subnode
dir and call it subnode.json
using this command:
mkdir -p config/subnode
cp subnode/subnode.sample.json config/subnode/subnode.json
Your tree should look like this:
subnode/
Dockerfile
subnode.sample.json
src/
...
config/
subnode/
subnode.json
Then edit config/subnode/subnode.json
based on your needs.
Create a file named docker-compose.yml
alongside subnode
and config
dirs. Write this content in it:
version: "3.9"
subnode:
build: ./subnode
restart: always
ports:
- 8080:8080 # change the port based on your need
links:
- mongodb:mongodb # the hostname of db, should be used in config file
volumes:
- ./config/subnode:/usr/src/app/config
environment:
- CONFIG_PATH=/usr/src/app/config/subnode.json
container_name: subnode
mongodb:
image: mongo:latest
restart: always
ports:
- "127.0.0.1:27017:27017"
container_name: mongodb
Now you can easily run the application using this command:
docker compose up -d mongodb
docker compose up -d subnode