Skip to content

Commit 7ab20cd

Browse files
Add mkdocs site
0 parents  commit 7ab20cd

File tree

125 files changed

+1777
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1777
-0
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Configure Git Credentials
20+
run: |
21+
git config user.name github-actions[bot]
22+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: 3.x
26+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
27+
28+
- uses: actions/cache@v4
29+
with:
30+
key: mkdocs-material-${{ env.cache_id }}
31+
path: .cache
32+
restore-keys: |
33+
mkdocs-material-
34+
- run: pip install -r requirements.txt
35+
- run: mkdocs gh-deploy --force
36+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
site/

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
.PHONY: docs-serve
3+
docs-serve: deps-install
4+
mkdocs serve
5+
6+
.PHONY: deps-install
7+
deps-install:
8+
pip install -r requirements.txt
9+
10+
.PHONY: docs-build
11+
docs-build:
12+
mkdocs build
13+

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Reconmap documentation
2+
3+
This repository contain the markdown files that generate content for https://reconmap.com
4+
5+
## Dependencies
6+
7+
- Python
8+
- PIP
9+
- Make
10+
11+
## How to run locally
12+
13+
```shell
14+
make
15+
xdg-open http://localhost:8000
16+
```

docs/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
reconmap.com
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Attachment limits
3+
parent: Admin manual
4+
---
5+
6+
The docker images provided by Reconmap come with some pre-defined limits that we consider reasonable for most of the use cases we have encounter. Some of the limits can be found below:
7+
8+
| File | Max upload size |
9+
| -------------- | --------------- |
10+
| Attachment | 20MB |
11+
| Command output | 10MB |
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Configuring CORS
3+
parent: Admin manual
4+
---
5+
6+
The Cross-Origin Resource Sharing ([CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)) settings can be found in the `config.json` file in the API backend directory. If the file does not exist, create one using [this template file](https://github.com/reconmap/rest-api/blob/master/config-template.json) as a template.
7+
8+
Edit the content of the file to show (adjusting the values accordingly):
9+
10+
### Allowing any domain from a list
11+
12+
```json
13+
{
14+
"cors": {
15+
"allowedOrigins": ["http://localhost:5500", "http://127.0.0.1:5500"]
16+
}
17+
}
18+
```
19+
20+
### Allowing any origin
21+
22+
**CAUTION:** This configuration is not recommended as it relaxes the security rules for your instance, but it can be handy for debugging purposes.
23+
{: .fw-700 .p-2 .text-red-200 .bg-yellow-100 }
24+
25+
```json
26+
{
27+
"cors": {
28+
"allowedOrigins": ["*"]
29+
}
30+
}
31+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Configuring database settings
3+
parent: Admin manual
4+
---
5+
6+
The database settings can be found in the `config.json` file in the API backend directory. If the file does not exist, create one using [this file](https://github.com/Reconmap/api-backend/blob/master/config-template.json) as a template.
7+
8+
Edit the content of the file to show (adjusting the values accordingly):
9+
10+
```json
11+
{
12+
"database": {
13+
"host": "rmap-mysql",
14+
"username": "reconmapper",
15+
"password": "reconmapped",
16+
"name": "reconmap"
17+
}
18+
}
19+
```
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Configuring logging settings
3+
parent: Admin manual
4+
---
5+
6+
Reconmap API can be configured to log application messages to multiple destinations including local files or remote sys log servers.
7+
8+
### Logging to local files
9+
10+
Edit the `config.json` to show the following content at the top level:
11+
12+
```json
13+
{
14+
...
15+
"logging": {
16+
"file": {
17+
"enabled": true,
18+
"level": "debug",
19+
"path": "/var/www/webapp/logs/application.log"
20+
}
21+
},
22+
...
23+
}
24+
```
25+
26+
### Logging to Graylog using GELF
27+
28+
First make sure to spin up a [Graylog](https://www.graylog.org/) somewhere in your system. You can use the following docker compose file to start one with all its dependencies.
29+
30+
```yaml
31+
version: "3.8"
32+
33+
services:
34+
elasticsearch:
35+
image: "docker.elastic.co/elasticsearch/elasticsearch:7.12.1"
36+
environment:
37+
- node.name=elasticsearch
38+
- cluster.name=docker-cluster
39+
- bootstrap.memory_lock=true
40+
- discovery.type=single-node
41+
- xpack.security.enabled=false
42+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
43+
ulimits:
44+
memlock:
45+
soft: -1
46+
hard: -1
47+
volumes:
48+
- esdata:/usr/share/elasticsearch/data
49+
ports:
50+
- 9200:9200
51+
mongodb:
52+
image: "mongo:4.2"
53+
restart: always
54+
55+
graylog:
56+
image: "graylog/graylog:4.3.2"
57+
depends_on:
58+
- elasticsearch
59+
- mongodb
60+
entrypoint: "/usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh"
61+
environment:
62+
GRAYLOG_PASSWORD_SECRET: somepasswordpepper
63+
# to generate a password hash, type: echo -n admin | shasum -a 256
64+
GRAYLOG_ROOT_PASSWORD_SHA2: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
65+
GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9001"
66+
GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9001/"
67+
GRAYLOG_ELASTICSEARCH_HOSTS: "http://elasticsearch:9200"
68+
GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
69+
ports:
70+
- "5044:5044/tcp" # Beats
71+
- "5140:5140/udp" # Syslog
72+
- "5140:5140/tcp" # Syslog
73+
- "5555:5555/tcp" # RAW TCP
74+
- "5555:5555/udp" # RAW TCP
75+
- "9001:9001/tcp" # Server API
76+
- "12201:12201/tcp" # GELF TCP
77+
- "12201:12201/udp" # GELF UDP
78+
- "13301:13301/tcp" # Forwarder data
79+
- "13302:13302/tcp" # Forwarder config
80+
volumes:
81+
esdata:
82+
```
83+
84+
Ensure to edit `config.json` file to enable the gelf log handler and point to the hostname and IP of your graylog server.
85+
86+
```json
87+
{
88+
...
89+
"logging": {
90+
"gelf": {
91+
"enabled": true,
92+
"level": "debug",
93+
"serverName": "api-graylog-1",
94+
"serverPort": 12201
95+
}
96+
},
97+
...
98+
}
99+
```
100+
101+
Now you can view all your application logs from the convenience of your browser at [http://localhost:9001](http://localhost:9001)
102+
103+
![Graylog log management](/images/integrations/graylog.png)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Configuring SMTP settings
3+
parent: Admin manual
4+
---
5+
6+
The SMTP settings can be found in the `config.json` file in the API backend directory. If the file does not exist, create one using [this file](https://github.com/Reconmap/api-backend/blob/master/config-template.json) as a template.
7+
8+
Edit the content of the file to show (adjusting the values accordingly):
9+
10+
```json
11+
{
12+
"smtp": {
13+
"host": "just.another.smtp.server",
14+
"port": 587,
15+
"username": "smtpuser",
16+
"password": "smtpsecret",
17+
"fromEmail": "no-reply@reconmap.com",
18+
"fromName": "Reconmap"
19+
}
20+
}
21+
```

0 commit comments

Comments
 (0)