Skip to content

Commit f41d606

Browse files
Merge branch 'master' into alpha/bugs
2 parents 21ef21a + 2dd2226 commit f41d606

25 files changed

+1133
-184
lines changed

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1+
# Editor Stuff
12
.vscode
3+
.idea
4+
5+
# Environment
6+
.env
7+
8+
# Logs
9+
logs
10+
*.log
11+
npm-debug.log*
12+
yarn-debug.log*
13+
yarn-error.log*
14+
pnpm-debug.log*
15+
lerna-debug.log*
16+
17+
node_modules
18+
.vite
19+
dist
20+
dist-ssr
21+
*.local
22+
deno.lock
23+
# Editor directories and files
24+
.vscode/*
25+
!.vscode/extensions.json
26+
.idea
27+
.DS_Store
28+
*.suo
29+
*.ntvs*
30+
*.njsproj
31+
*.sln
32+
*.sw?

LICENSE.md

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
11
# Domain-Forge
22

3-
_DomainForge is an innovative tool that is designed to help members of MDG space
4-
generate dynamic subdomains. It is a highly effective subdomain generator that
5-
maps user resources to each subdomain, making it easier for users to manage
6-
their different projects and resources._
3+
![GitHub License](https://img.shields.io/github/license/mdgspace/domain-forge)
4+
![GitHub issues](https://img.shields.io/github/issues/mdgspace/domain-forge)
5+
![GitHub Repo stars](https://img.shields.io/github/stars/mdgspace/domain-forge)
6+
![GitHub forks](https://img.shields.io/github/forks/mdgspace/domain-forge)
7+
![GitHub watchers](https://img.shields.io/github/watchers/mdgspace/domain-forge)
78

8-
Find product related research
9+
10+
_DomainForge serves as a versatile tool for creating dynamic subdomains, while also providing storage and computing capabilities to members of your organization. Moreover, it simplifies the setup process by seamlessly transitioning from a GitHub repository to the build phase. This all-inclusive solution enhances operational efficiency, empowering members with a streamlined and automated workflow from repository setup to deployment._
11+
12+
> Find product related research
913
[here](https://obvious-acrylic-f12.notion.site/DomainForge-A-dynamic-sub-domain-creator-e860af60894e4a3bb0482ea3dd746451)
14+
15+
## Installation
16+
17+
This section is designated for organizational administrators who leverage this tool to facilitate the creation of dynamic subdomains, while also furnishing storage and computing functionalities to members of the organization. For comprehensive installation guidelines, please refer to this [documentation](./docs/admin/README.md).
18+
19+
## Usage
20+
21+
This section is relevant to the users of the tool. For detailed guidance on effectively leveraging this tool to deploy your projects within your organization, please refer to this [documentation](./docs/users/README.md) for comprehensive instructions.
22+
23+
## License
24+
25+
[AGPL v3](./LICENSE.md)
26+
27+
## Contributing
28+
29+
We welcome pull requests. If you're considering significant changes, please initiate a discussion by opening an issue first. Additionally, please ensure your commits follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format.
30+
31+
Thank you to everyone who's already contributed!
32+
33+
[![](https://contrib.rocks/image?repo=mdgspace/domain-forge)](https://github.com/mdgspace/domain-forge/graphs/contributors)
34+
35+
*If you find this tool useful, consider leaving a :star:.*
36+
Made with :heart: by **MDG Space**

docker/.dockerignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Environment
2+
.env
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
pnpm-debug.log*
11+
lerna-debug.log*
12+
13+
node_modules
14+
.vite
15+
dist
16+
dist-ssr
17+
*.local
18+
deno.lock
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
.DS_Store
25+
*.suo
26+
*.ntvs*
27+
*.njsproj
28+
*.sln
29+
*.sw?
30+
31+
# Version control
32+
.git
33+
.gitignore
34+
35+
# Docker
36+
.dockerignore
37+
Dockerfile.backend
38+
Dockerfile.frontend
39+
docker-compose.yml
40+
dev.docker-compose.yml

docker/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/Dockerfile.backend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ COPY . ./
66

77
RUN deno cache src/backend/dependencies.ts
88

9-
CMD ["run", "--allow-net", "--allow-env", "--allow-read","--allow-run","--allow-write","src/backend/server.ts"]
9+
CMD ["run", "--allow-net", "--allow-env", "--allow-read","--allow-run","--allow-sys","--allow-write","src/backend/server.ts"]

docker/dev.docker-compose.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "3.9"
2+
3+
services:
4+
deno:
5+
container_name: df_backend
6+
image: df_backend
7+
restart: always
8+
volumes:
9+
- type: bind
10+
source: ../docker/named_pipe
11+
target: /hostpipe
12+
build:
13+
context: ..
14+
dockerfile: docker/Dockerfile.backend
15+
target: base
16+
ports:
17+
- "${PORT_BACKEND}:7000"
18+
env_file:
19+
- ../src/backend/.env
20+
vue:
21+
container_name: df_frontend
22+
image: df_frontend
23+
restart: always
24+
build:
25+
context: ..
26+
dockerfile: docker/Dockerfile.frontend
27+
target: base
28+
ports:
29+
- "${PORT_FRONTEND}:8000"

docs/.gitkeep

Whitespace-only changes.

docs/admin/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Installation
2+
3+
### 1. Clone the Repository
4+
5+
Run the following command on your server to clone the repository.
6+
```bash
7+
git clone https://github.com/mdgspace/domain-forge.git
8+
```
9+
10+
### 2. Configuring the Environment Variables
11+
12+
This step involves the configuration of three `.env` files:
13+
- Docker env:
14+
As suggested in the `.env.sample` present at the `docker/` directory, create a file named `.env` and copy the contents as shown, replacing *"XXXX"* by the frontend and backend ports you want your application to run on.
15+
```
16+
PORT_BACKEND=XXXX
17+
PORT_FRONTEND=XXXX
18+
```
19+
- Backend env:
20+
As suggested in the `.env.sample` present at the `src/backend` directory, create a file named `.env` and copy the contents as shown, replacing *"..."* with the respective values for your registered github oauth application's **GITHUB_OAUTH_CLIENT_ID** and **GITHUB_OAUTH_CLIENT_SECRET**. Fill in the **MONGO_API_KEY** and **MONGO_APP_ID** you obtain upon creating a cluster in *MongoDB Atlas*
21+
```
22+
GITHUB_OAUTH_CLIENT_ID=...
23+
GITHUB_OAUTH_CLIENT_SECRET=...
24+
MONGO_API_KEY=...
25+
MONGO_APP_ID=...
26+
```
27+
- Frontend env:
28+
As suggested in the `.env.sample` present at the `src/frontend` directory, create a file named `.env` and copy the contents as shown, replacing *"..."* with the respective values for your registered github oauth application's **VITE_APP_GITHUB_OAUTH_CLIENT_ID** and **VITE_APP_GITHUB_OAUTH_CLIENT_SECRET**. For the **VITE_APP_GITHUB_OAUTH_REDIRECT_URL** enter the public url of the application's `/login` route. (Example: `http://df.mdgspace.org/login`). Also, add the port at which your backend is running in place of *"XXXX"*.
29+
```
30+
VITE_APP_GITHUB_OAUTH_CLIENT_ID=...
31+
VITE_APP_GITHUB_OAUTH_CLIENT_SECRET=...
32+
VITE_APP_GITHUB_OAUTH_REDIRECT_URL=...
33+
VITE_APP_BACKEND_PORT=XXXX
34+
```
35+
36+
### 3. Build Docker Image
37+
38+
> If you do not have docker installed on your system, visit [this](https://docs.docker.com/engine/install/).
39+
40+
Navigate to the `docker` directory and build the images in the background using the following command.
41+
```bash
42+
cd docker/
43+
docker compose up --build -d
44+
```
45+
46+
### 4. Setup Named Pipes
47+
48+
Navigate to the `docker/named_pipe` directory and execute the `listen.sh` script to allow the application to run commands on the host.
49+
```bash
50+
cd docker/named_pipe
51+
./listen.sh
52+
```
53+
> Make sure to check the permissions of the `listen.sh` file. You can change them using the `chmod` command.
54+
55+
### 5. Installing and Configuring NGINX
56+
57+
Install NGINX on your server from [here](https://www.nginx.com/resources/wiki/start/topics/tutorials/install/).
58+
Refer to [this](https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04) to configure NGINX to serve your application.
59+
60+
### 6. Adding the DNS Records and Issue SSL Certificates
61+
62+
Refer to [this](https://developers.cloudflare.com/dns/manage-dns-records/how-to/create-dns-records/) to add DNS records for *df.yourorgname.com* and also a wildcard DNS record for **.df.yourorgname.com*
63+
64+
You can use [letsencrypt](https://letsencrypt.org/) to issue SSL certificates for *df.yourorgname.com* and a wildcard SSL certificate for **.df.yourorgname.com*.

docs/assets/add-domain.png

53.5 KB
Loading

0 commit comments

Comments
 (0)