-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
110 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=CveXplore Backend service | ||
Requires=docker.service | ||
After=docker.service | ||
|
||
[Service] | ||
Restart=always | ||
WorkingDirectory=${HOME}/.cvexplore | ||
# Shutdown container (if running) when unit is started | ||
ExecStartPre=/usr/bin/docker-compose -f docker-compose.yml down | ||
# Start container when unit is started | ||
ExecStart=/usr/bin/docker-compose -f docker-compose.yml up | ||
# Stop container when unit is stopped | ||
ExecStop=/usr/bin/docker-compose -f docker-compose.yml down | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: '3.5' | ||
|
||
services: | ||
|
||
redis: | ||
image: cvexplore-redis | ||
hostname: redis | ||
restart: always | ||
volumes: | ||
- redis_data:/data | ||
ports: | ||
- "127.0.0.1:6379:6379" | ||
|
||
celery_daemon: | ||
image: cvexplore-celery_daemon | ||
depends_on: | ||
- redis | ||
env_file: | ||
- ${HOME}/.cvexplore/.env | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
deploy: | ||
replicas: 2 | ||
restart: always | ||
environment: | ||
- PYTHONUNBUFFERED=TRUE | ||
volumes: | ||
- celery_data:/app/data | ||
|
||
celery_beat: | ||
image: cvexplore-celery_beat | ||
depends_on: | ||
- redis | ||
env_file: | ||
- ${HOME}/.cvexplore/.env | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
restart: always | ||
environment: | ||
- PYTHONUNBUFFERED=TRUE | ||
volumes: | ||
- celery_data:/app/data | ||
|
||
volumes: | ||
celery_data: | ||
driver: local | ||
redis_data: | ||
driver: local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
General | ||
------- | ||
|
||
The backend as referred to in this documentation consists of a celery daemon with a redis broker. | ||
This will give CveXplore the possibility to easily create and maintain background tasks for for instance database | ||
maintenance and re-processing of updated database entries. | ||
|
||
The use of this backend is **optional** and CveXplore can function perfectly without one; the tasks it performs can well | ||
be handled by another mechanism. It is, however, a nice addition to the functionalities CveXplore offers. | ||
|
||
Task handling (CRUD actions en status updates) are handled via a separate class and can be controlled via package or | ||
CLI commands. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
Installation | ||
------------ | ||
|
||
The backend assumes that the CveXplore package is installed; check the package :ref:`installation <index:installation>` | ||
paragraph. | ||
The backend assumes that the CveXplore package is installed **first**; check the package :ref:`installation <index:installation>` | ||
paragraph. | ||
|
||
Docker | ||
###### | ||
|
||
Please ensure that you have docker and docker-compose installed before processing with the rest of this paragraph. | ||
|
||
|
||
|
||
Systemd | ||
####### | ||
|
||
The backend tasks are powered by celery; please follow | ||
`these instructions <https://docs.celeryq.dev/en/stable/userguide/daemonizing.html#usage-systemd>`_ if you prefer | ||
to use systemd instead of a docker deployment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Settings | ||
-------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ Welcome to CveXplore's documentation! | |
|
||
/backend/general | ||
/backend/installation | ||
/backend/settings |