Compare commits
6 Commits
bb65de3b99
...
a99cb3d2cc
| Author | SHA1 | Date | |
|---|---|---|---|
| a99cb3d2cc | |||
| df0083e334 | |||
| a5ec3ca6cb | |||
| b985818f5a | |||
| b441ea4832 | |||
| 5b0e0e07a6 |
@@ -32,7 +32,7 @@ Table Report:
|
||||
|
||||
#### Warning
|
||||
|
||||
Please note that containers will use ports from 13241 to 13245 and 8080, so there is must be no listeners on this ports range.
|
||||
Please note that containers will use ports from 13240 to 13248, so there is must be no listeners on this ports range.
|
||||
|
||||
#### Configure
|
||||
|
||||
@@ -66,7 +66,7 @@ docker compose up -d --build
|
||||
|
||||
#### Structure
|
||||
|
||||
- **backend**: [127.0.0.1:8080](http://127.0.0.1:8080) -> `8080`
|
||||
- **backend**: [127.0.0.1:13240](http://127.0.0.1:13240) -> `8080`
|
||||
- Depends on: `postgres`, `redis`, `minio`, `backend-initdb`
|
||||
- **backend-initdb**
|
||||
- Depends on: `postgres`, `redis`, `minio`
|
||||
@@ -139,7 +139,7 @@ You may say: "For what we need a lot of complex technologies for now". I have an
|
||||
|
||||
### Restful API
|
||||
|
||||
API Base endpoint when deployed with default docker compose: [127.0.0.1:8080](http://127.0.0.1:8080), also see [docs](#openapi-docs).
|
||||
API Base endpoint when deployed with default docker compose: [127.0.0.1:13240](http://127.0.0.1:13240), also see [docs](#openapi-docs).
|
||||
|
||||
### Admin panel
|
||||
|
||||
@@ -234,9 +234,9 @@ Moderation implemented via report system. Client goes to `/report` ([see OpenAPI
|
||||
Also admin user (whose credentials specified lower) can add new staff members and even create a specified group for them (this is built-in django capabilities).
|
||||
Report has four states: Sent, Under review, Took action and Skipped. Admin panel has filtration by states and by flagged by llm status.
|
||||
|
||||
Admin panel when deployed with docker compose (by default): [localhost:8080/admin/](http://localhost:8080/admin/)
|
||||
Admin panel when deployed with docker compose (by default): [localhost:13240/admin/](http://localhost:13240/admin/)
|
||||
|
||||
Reports list when deployed with docker compose (requires authentication): [localhost:8080/admin/campaign/campaignreport/](http://localhost:8080/admin/campaign/campaignreport/)
|
||||
Reports list when deployed with docker compose (requires authentication): [localhost:13240/admin/campaign/campaignreport/](http://localhost:13240/admin/campaign/campaignreport/)
|
||||
|
||||
Default username: `admin`
|
||||
|
||||
@@ -276,11 +276,11 @@ Demonstration:
|
||||
|
||||
### OpenAPI docs
|
||||
|
||||
When deployed with default docker compose: [localhost:8080/docs](http://localhost:8080/docs)
|
||||
When deployed with default docker compose: [localhost:13240/docs](http://localhost:13240/docs)
|
||||
|
||||
### Healthcheck endpoint
|
||||
|
||||
When deployed with default docker compose: [localhost:8080/health](http://localhost:8080/health)
|
||||
When deployed with default docker compose: [localhost:13240/health](http://localhost:13240/health)
|
||||
|
||||
Lets developers easily understand and identify problem and users check services health.
|
||||
|
||||
|
||||
+48
-18
@@ -5,6 +5,9 @@ services:
|
||||
build:
|
||||
context: ./services/backend
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- adnova-backend:latest
|
||||
pull: true
|
||||
depends_on:
|
||||
backend-initdb:
|
||||
restart: false
|
||||
@@ -18,10 +21,6 @@ services:
|
||||
restart: false
|
||||
condition: service_healthy
|
||||
required: true
|
||||
minio:
|
||||
restart: false
|
||||
condition: service_healthy
|
||||
required: true
|
||||
env_file:
|
||||
- path: ./infrastructure/backend/.env.template
|
||||
required: true
|
||||
@@ -30,16 +29,20 @@ services:
|
||||
ports:
|
||||
- name: web
|
||||
target: 8080
|
||||
published: 8080
|
||||
published: 13240
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
backend-initdb:
|
||||
build:
|
||||
context: ./services/backend
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- adnova-backend:latest
|
||||
pull: true
|
||||
command: ./scripts/initdb
|
||||
depends_on:
|
||||
postgres:
|
||||
@@ -50,27 +53,27 @@ services:
|
||||
restart: false
|
||||
condition: service_healthy
|
||||
required: true
|
||||
minio:
|
||||
restart: false
|
||||
condition: service_healthy
|
||||
required: true
|
||||
env_file:
|
||||
- path: ./infrastructure/backend/.env.template
|
||||
required: true
|
||||
- path: ./infrastructure/backend/.env
|
||||
required: false
|
||||
shm_size: 4mb
|
||||
|
||||
backend-staticfiles:
|
||||
build:
|
||||
context: ./services/backend
|
||||
dockerfile: Dockerfile.staticfiles
|
||||
tags:
|
||||
- adnova-backend-staticfiles:latest
|
||||
pull: true
|
||||
env_file:
|
||||
- path: ./infrastructure/backend/.env.template
|
||||
required: true
|
||||
- path: ./infrastructure/backend/.env
|
||||
required: false
|
||||
healthcheck:
|
||||
test: ["CMD", "service", "nginx", "status", "||", " exit 1"]
|
||||
test: ["CMD-SHELL", "nginx", "-t", "||", "exit 1"]
|
||||
interval: 1m30s
|
||||
timeout: 5s
|
||||
start_period: 5s
|
||||
@@ -84,11 +87,15 @@ services:
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
backend-celery-worker:
|
||||
build:
|
||||
context: ./services/backend
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- adnova-backend:latest
|
||||
pull: true
|
||||
command: celery -A config worker -l INFO
|
||||
depends_on:
|
||||
redis:
|
||||
@@ -108,6 +115,7 @@ services:
|
||||
start_period: 10s
|
||||
start_interval: 2s
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
celery-exporter:
|
||||
image: docker.io/danihodovic/celery-exporter:0.12.2
|
||||
@@ -122,7 +130,10 @@ services:
|
||||
required: true
|
||||
- path: ./infrastructure/celery-exporter/.env
|
||||
required: false
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
telegram_bot:
|
||||
build:
|
||||
@@ -130,6 +141,7 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- adnova-telegram_bot:latest
|
||||
pull: true
|
||||
depends_on:
|
||||
backend:
|
||||
restart: false
|
||||
@@ -148,7 +160,10 @@ services:
|
||||
required: true
|
||||
- path: ./infrastructure/telegram_bot/.env
|
||||
required: false
|
||||
profiles:
|
||||
- telegram_bot
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
redis:
|
||||
image: docker.io/redis:7-alpine3.21
|
||||
@@ -187,6 +202,8 @@ services:
|
||||
required: true
|
||||
- path: ./infrastructure/redis-exporter/.env
|
||||
required: false
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
@@ -201,7 +218,7 @@ services:
|
||||
- path: ./infrastructure/postgres/.env
|
||||
required: false
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready"]
|
||||
test: ["CMD", "pg_isready", "-U", "postgres"]
|
||||
interval: 1m30s
|
||||
timeout: 5s
|
||||
start_period: 5s
|
||||
@@ -230,6 +247,8 @@ services:
|
||||
required: true
|
||||
- path: ./infrastructure/postgres-exporter/.env
|
||||
required: false
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
@@ -262,6 +281,8 @@ services:
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
secrets:
|
||||
- source: pgadmin_password
|
||||
@@ -274,10 +295,10 @@ services:
|
||||
|
||||
grafana:
|
||||
image: docker.io/grafana/grafana-oss:12.0.2
|
||||
entrypoint: ["/etc/grafana/scripts/entrypoint.sh"]
|
||||
configs:
|
||||
- source: grafana_config
|
||||
target: /usr/share/grafana/conf/defaults.ini
|
||||
entrypoint: ["/etc/grafana/scripts/entrypoint.sh"]
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-O", "-", "http://localhost:3000/api/health"]
|
||||
interval: 1m30s
|
||||
@@ -292,6 +313,8 @@ services:
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
volumes:
|
||||
@@ -325,6 +348,8 @@ services:
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
volumes:
|
||||
@@ -360,7 +385,10 @@ services:
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
profiles:
|
||||
- minio
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
volumes:
|
||||
- type: volume
|
||||
source: minio_data
|
||||
@@ -382,18 +410,17 @@ services:
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
- name: api
|
||||
target: 9411
|
||||
published: 13247
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
profiles:
|
||||
- observability
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
loadtest:
|
||||
build:
|
||||
context: ./services/loadtest
|
||||
dockerfile: Dockerfile
|
||||
tags:
|
||||
- adnova-loadtest:latest
|
||||
depends_on:
|
||||
backend:
|
||||
restart: false
|
||||
@@ -411,7 +438,10 @@ services:
|
||||
host_ip: 127.0.0.1
|
||||
protocol: tcp
|
||||
app_protocol: http
|
||||
profiles:
|
||||
- loadtest
|
||||
restart: unless-stopped
|
||||
shm_size: 4mb
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,13 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: "celery"
|
||||
- name: "default"
|
||||
orgId: 1
|
||||
folder: ""
|
||||
type: file
|
||||
disableDeletion: false
|
||||
updateIntervalSeconds: 10
|
||||
allowUiUpdates: false
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards
|
||||
foldersFromFilesStructure: true
|
||||
|
||||
@@ -1,10 +1,29 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Infinity
|
||||
- name: Backend | Infinity
|
||||
type: yesoreyeram-infinity-datasource
|
||||
access: proxy
|
||||
orgId: 1
|
||||
uid: infinity
|
||||
url: http://backend:8080
|
||||
basicAuth: false
|
||||
basicAuthUser: ""
|
||||
withCredentials: false
|
||||
isDefault: false
|
||||
editable: false
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
orgId: 1
|
||||
uid: prometheus
|
||||
url: http://prometheus:9090
|
||||
basicAuth: false
|
||||
basicAuthUser: ""
|
||||
withCredentials: false
|
||||
isDefault: true
|
||||
editable: false
|
||||
jsonData:
|
||||
httpMethod: POST
|
||||
queryTimeout: 10s
|
||||
timeInterval": 10s
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# Below all environment variables and default values
|
||||
|
||||
BACKEND_BASE_URL=http://127.0.0.1:8080
|
||||
BACKEND_BASE_URL=http://127.0.0.1:13240
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ Ensure you have the following installed on your system:
|
||||
|
||||
## Warning
|
||||
|
||||
Please note that containers will use ports from 13241 to 13246 and 8080, so there is must be no listeners on this ports range.
|
||||
Please note that containers will use ports from 13240 to 13248, so there is must be no listeners on this ports range.
|
||||
|
||||
## Setup
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
BACKEND_BASE_URL = os.getenv("BACKEND_BASE_URL", "http://127.0.0.1:8080")
|
||||
BACKEND_BASE_URL = os.getenv("BACKEND_BASE_URL", "http://127.0.0.1:13240")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
|
||||
Reference in New Issue
Block a user