2025-10-08 19:24:22 +01:00
|
|
|
## Deployment
|
|
|
|
|
|
2025-10-15 14:52:25 +01:00
|
|
|
Deployment is automated via Forgejo action. See `.forgejo` directory.
|
2025-10-08 19:24:22 +01:00
|
|
|
|
2025-10-13 18:50:38 +01:00
|
|
|
Deployment actions are always executed by the `deploy` user on the VPS.
|
|
|
|
|
|
2025-10-08 19:24:22 +01:00
|
|
|
On pushes to `main`:
|
|
|
|
|
|
2025-10-15 14:55:33 +01:00
|
|
|
- Bump version depending on commit keyword, create Git tag (if necessary) and
|
|
|
|
|
automatically update [package.json](./package.json):
|
2025-10-13 18:50:38 +01:00
|
|
|
|
2025-10-15 14:49:56 +01:00
|
|
|
- Install `rsync` on the `ubuntu-latest` runner
|
2025-10-13 18:50:38 +01:00
|
|
|
|
2025-10-15 14:49:56 +01:00
|
|
|
- `rysnc` over SSH to copy changed files from this repository to VPS deployment directory, excluding`.env`.
|
2025-10-13 18:50:38 +01:00
|
|
|
|
2025-10-15 14:58:02 +01:00
|
|
|
- Restart running instance of `eolas-api` on VPS.
|
2025-10-15 14:49:56 +01:00
|
|
|
|
2025-10-15 14:55:33 +01:00
|
|
|
### Commit keywords
|
|
|
|
|
|
|
|
|
|
In accordance with SemVer:
|
|
|
|
|
|
|
|
|
|
- Major: `major: <commit description>`,
|
|
|
|
|
- Minor: `feat: <commit description>`,
|
|
|
|
|
- Patch: `fix: <commit description>`
|
|
|
|
|
|
|
|
|
|
Ignored keywords: `chore`, `test`, `refactor`, and anything else.
|
|
|
|
|
|
2025-10-15 14:49:56 +01:00
|
|
|
### `systemd` service
|
|
|
|
|
|
|
|
|
|
On the VPS, `eolas-api` runs as a `systemd` service. This service is restarted as part of
|
|
|
|
|
the deployment. See copy of this file at
|
2025-10-15 14:51:10 +01:00
|
|
|
[systemd/eolas-api.service](./systemd/eolas-api.service).
|
2025-10-13 18:50:38 +01:00
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
|
|
### Entries
|
|
|
|
|
|
|
|
|
|
#### Get all entries
|
|
|
|
|
|
|
|
|
|
Return all entries. Optionally limit by length and/or date.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
GET /entries?limit=2&sort=date
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"count": 5,
|
|
|
|
|
"data": [
|
|
|
|
|
{
|
|
|
|
|
"title": "SSH",
|
|
|
|
|
"last_modified": "2025-07-10 14:26:04"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"title": "List_largest_files_bash",
|
|
|
|
|
"last_modified": "2025-07-07 16:49:12"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Get specific entry
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
GET /entries/Memory_versus_processor
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"title": "Memory_versus_processor",
|
|
|
|
|
"last_modified": "2024-10-18 19:17:01",
|
|
|
|
|
"size": 270,
|
|
|
|
|
"body": "# Memory versus processor\n\n Would a more powerful processor with average or reduced memory capacity..."
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Get backlinks for an entry
|
|
|
|
|
|
|
|
|
|
Defaults to alphabetic list.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
GET /entries/backlinks/The_kernel
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"count": 3,
|
|
|
|
|
"data": ["Boot_process", "Containerization", "CPU_architecture"]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Get outlinks for an entry
|
|
|
|
|
|
|
|
|
|
Defaults to alphabetic list.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
GET /entries/outlinks/The_kernel
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"count": 3,
|
|
|
|
|
"data": ["Basic_model_of_the_operating_system", "Processes", "User_Space"]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
#### Get entries associated with a specified tag
|
|
|
|
|
|
|
|
|
|
Optionally sort chronologically.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
GET /entries/tag/memory?sort=date
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"count": 3,
|
|
|
|
|
"data": [
|
|
|
|
|
{
|
|
|
|
|
"entry_title": "Memory_addresses"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"entry_title": "Call_stack"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"entry_title": "The_memory_hierarchy"
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Tags
|
|
|
|
|
|
|
|
|
|
#### Get all tags
|
|
|
|
|
|
|
|
|
|
Sorted alphabetically.
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
GET /tags
|
|
|
|
|
```
|
2025-10-08 19:24:22 +01:00
|
|
|
|
2025-10-13 18:50:38 +01:00
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"count": 119,
|
|
|
|
|
"data": ["algebra", "algorithms", "analogue", "android", "..."]
|
|
|
|
|
}
|
|
|
|
|
```
|
2025-10-08 19:24:22 +01:00
|
|
|
|
2025-10-13 18:50:38 +01:00
|
|
|
#### Get tags for specified entry
|
2025-10-09 18:53:31 +01:00
|
|
|
|
2025-10-13 18:50:38 +01:00
|
|
|
```
|
|
|
|
|
GET /tags/The_kernel
|
|
|
|
|
```
|
2025-10-09 18:53:31 +01:00
|
|
|
|
2025-10-13 18:50:38 +01:00
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"count": 4,
|
|
|
|
|
"data": [
|
|
|
|
|
"computer-architecture",
|
|
|
|
|
"memory",
|
|
|
|
|
"operating-systems",
|
|
|
|
|
"systems-programming"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|