Skip to content

Commit 7ee0fee

Browse files
squash
1 parent ba9f7c2 commit 7ee0fee

File tree

448 files changed

+27011
-31499
lines changed

Some content is hidden

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

448 files changed

+27011
-31499
lines changed

.dockerignore

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
.DS_Store
22
.idea
33
.vscode
4-
db/*
4+
db
55
venv
66
__pycache__
77
migrations
88
file_store
9+
storage
10+
worker_tmp
11+
temp_zip
912

10-
/node_modules
11-
/.pnp
13+
node_modules
14+
.pnp
1215
.pnp.js
1316

14-
/coverage
17+
coverage
1518

16-
/build
17-
18-
.env.local
19-
.env.development.local
20-
.env.test.local
21-
.env.production.local
19+
build
2220

2321
npm-debug.log*
2422
yarn-debug.log*

.env.sample

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Common Environment:
2+
DEBUG=true
3+
SECRET_KEY='django-insecure-%o*gv0gtraw6@&@_a*c)$x%wuy8w55a2n3x^c2%0$9wm+0q8ot'
4+
SECRET_ALGO=HS256
5+
MAX_WORKER=5
6+
7+
# Storage DB Environment:
8+
DB_STORAGE_USER=issadmin
9+
DB_STORAGE_PASSWORD=issadminpassword
10+
11+
# Storage Broker Environment:
12+
BROKER_URL=redis://iss-broker:6379/0
13+
14+
# App DB Environment:
15+
DB_APP_DB_NAME=iss_app_db
16+
DB_APP_AUTH_METHOD=trust
17+
18+
# App Backend Environment:
19+
SERVER_ORIGINS=127.0.0.1,localhost,iss-test-front,iss-front,iss-test-back,iss-back
20+
BACKEND_PORT=8000
21+
22+
# STORAGE Backend Environment:
23+
STORAGE_PORT=9000
24+
25+
# App Frontend Environment:
26+
FRONTEND_PORT=3000

.github/workflows/tests.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Tests CI
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: self-hosted
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Build Images
14+
run: docker-compose -f docker-compose.test.yml build
15+
16+
test:
17+
runs-on: self-hosted
18+
needs: build
19+
steps:
20+
- name: Run Tests
21+
run: |
22+
docker-compose -f docker-compose.test.yml up -d --force-recreate
23+
sleep 30
24+
25+
echo Running front lint...
26+
docker exec iss-test-front npm run lint
27+
28+
echo Running front tests...
29+
docker exec iss-test-front npm run test
30+
31+
# docker exec iss-test-front npm run compile
32+
33+
echo Running back/storage lint...
34+
docker exec iss-tests flake8
35+
36+
echo Running back tests...
37+
docker exec iss-test-back ./manage.py test
38+
39+
echo Running storage tests...
40+
docker exec iss-test-storage python3 src/test.py
41+
42+
# docker exec iss-tests python3 test.py
43+
44+
clean:
45+
runs-on: self-hosted
46+
needs: test
47+
if: always()
48+
steps:
49+
- name: Clean up
50+
run: |
51+
docker-compose -f docker-compose.test.yml down --volumes --remove-orphans
52+
docker system prune --volumes --force

.gitignore

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22
.idea
33
.vscode
44
db
5+
embedding_db
6+
broker-db
7+
58
venv
69
__pycache__
710
migrations
811
file_store
12+
storage
13+
worker_tmp
14+
temp_zip
15+
*.db
916

1017
node_modules
1118
.pnp
@@ -15,11 +22,12 @@ coverage
1522

1623
build
1724

18-
.env.local
19-
.env.development.local
20-
.env.test.local
21-
.env.production.local
25+
.env
2226

2327
npm-debug.log*
2428
yarn-debug.log*
2529
yarn-error.log*
30+
package-lock.json
31+
frontend-app/package-lock.json
32+
33+
token.json

Dockerfile.backend

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
ENV PYTHONDONTWRITEBYTECODE=1 \
4+
PYTHONUNBUFFERED=1
5+
6+
RUN addgroup --system iss && adduser --system --group iss
7+
8+
WORKDIR /app
9+
10+
RUN apt-get update \
11+
&& apt-get install -y --no-install-recommends \
12+
gcc \
13+
libffi-dev \
14+
postgresql-client \
15+
libpq-dev \
16+
python3-dev \
17+
musl-dev \
18+
&& rm -rf /var/lib/apt/lists/*
19+
20+
COPY ./backend-app/requirements.txt ./
21+
22+
RUN pip install --no-cache-dir -r requirements.txt
23+
24+
COPY ./backend-app/ ./
25+
26+
RUN chown -R iss:iss /app

Dockerfile.frontend

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:20.4-slim
2+
3+
WORKDIR /app
4+
5+
COPY ./frontend-app/package.json ./
6+
COPY ./frontend-app/tsconfig.json ./
7+
COPY ./frontend-app/.eslintrc.json ./
8+
9+
RUN npm install
10+
RUN npm install -g serve
11+
12+
COPY ./frontend-app/src ./src
13+
COPY ./frontend-app/public ./public

Dockerfile.storage

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM python:3.13-slim-bookworm
2+
3+
ENV PYTHONDONTWRITEBYTECODE=1 \
4+
PYTHONUNBUFFERED=1
5+
6+
RUN addgroup --system iss && adduser --system --group iss
7+
8+
RUN apt-get update \
9+
&& apt-get install -y --no-install-recommends \
10+
gcc \
11+
libsqlite3-dev \
12+
libffi-dev \
13+
python3-dev \
14+
musl-dev \
15+
git \
16+
make \
17+
gettext \
18+
ffmpeg \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
WORKDIR /app
22+
23+
COPY ./storage-app/requirements.txt ./
24+
COPY ./scripts/install_sql_vec.sh ./
25+
26+
RUN chmod 744 install_sql_vec.sh && ./install_sql_vec.sh
27+
28+
RUN pip install --no-cache-dir -r requirements.txt
29+
30+
COPY ./storage-app/src ./src
31+
32+
RUN chown -R iss:iss /app

Dockerfile.tests

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
ENV PYTHONDONTWRITEBYTECODE=1 \
4+
PYTHONUNBUFFERED=1
5+
6+
WORKDIR /tests
7+
8+
COPY ./tests/requirements.txt ./
9+
10+
RUN pip install --no-cache-dir -r requirements.txt
11+
12+
COPY ./tests ./
13+
14+
COPY ./backend-app ./backend_code
15+
COPY ./storage-app/src ./storage_code

0 commit comments

Comments
 (0)