Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement database dependencies #115

Draft
wants to merge 448 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
448 commits
Select commit Hold shift + click to select a range
28b89f1
Add append to sharingset functionalities
Jun 17, 2022
f5de488
Allow searching only on 3 or more chars
Jun 17, 2022
265dc09
Add scope to news item
Jun 17, 2022
548d9c5
Change popup size
Jun 17, 2022
509c84c
Remove elevation of topic preview
Jun 17, 2022
7d9bf31
Add deselect function
Jun 17, 2022
339310a
Add reset filter function
Jun 17, 2022
e3ca1ec
Change styling
Jun 17, 2022
ed33a17
Add reset all filters on mounted
Jun 17, 2022
f1b78ed
Fix merge topic details appearance
Jun 17, 2022
813e6d9
Fix missing items count on share
Jun 17, 2022
a174c95
Add helper function
Jun 17, 2022
4424587
Outsource date chips as single component
Jun 17, 2022
8ed34c3
Outsource date-picker as single component
Jun 17, 2022
1957165
Outsource search field as single component
Jun 17, 2022
e0171cb
Apply outsourced components
Jun 17, 2022
11e083b
Outsource tag filter as single component
Jun 17, 2022
61d92e0
Apply outsourced components
Jun 17, 2022
8a1e91a
Outsource only-show as single component
Jun 17, 2022
e9dfe12
Outsource order-by as single component
Jun 17, 2022
865636c
Outsource logical-and as single component
Jun 17, 2022
49f2ac7
Adapt preselection
Jun 17, 2022
7410c77
Apply outsourced components
Jun 17, 2022
797eafb
Remove unused code
Jun 17, 2022
143b9ec
Add date fallback
Jun 17, 2022
ff8216f
Add generic dropdown component
Jun 17, 2022
bf52a93
Simplify direction switch of sorting component
Jun 17, 2022
f817e9a
Add text field component
Jun 17, 2022
acec466
Apply components
Jun 17, 2022
3626381
Add styling
Jun 17, 2022
2274a7b
Apply simplified components
Jun 17, 2022
bd61760
Fix tag filtering when list is empty
Jun 17, 2022
0a34b3c
Comment out unused code
Jun 17, 2022
df971f3
Remove unused code and add linting
Jun 17, 2022
b4201ed
Simplify card header
Jun 19, 2022
48f3c9d
Use for instead of index-search
Jun 19, 2022
b0dba8c
Remove unused hook
Jun 19, 2022
46d0680
Add dummy users
Jun 20, 2022
05947ef
Add additional color
Jun 20, 2022
7568566
Update query on filter change
Jun 20, 2022
f81817f
Ensure full width of headers
Jun 20, 2022
bf0be52
Fix scoped buttons
Jun 20, 2022
26208e3
Add shared status
Jun 20, 2022
da5b882
Remove unused code
Jun 20, 2022
2c9a710
Add flexibility to minitags
Jun 20, 2022
027d561
Fix padding
Jun 20, 2022
356bd1e
Allow different attribute name for dropdown selections
Jun 20, 2022
b5beb11
Outsource news items action
Jun 20, 2022
31130a6
Remove icon from textfield
Jun 20, 2022
e75a665
Add sharing state
Jun 20, 2022
bf31b0c
Add users to store
Jun 20, 2022
e88e072
Improve efficiency
Jun 22, 2022
19fb8eb
Add meta info sharing direction
Jun 22, 2022
c9b04b3
Use news-item-action component
Jun 22, 2022
c6e5d02
Add props to news-item-action component
Jun 22, 2022
33ec051
Update corner-tag behaviour
Jun 22, 2022
e27b923
Add popup component
Jun 22, 2022
4941770
Change 'changed' to 'pending'
Jun 22, 2022
20aff30
Add faker for temporal Summary generation
Jun 22, 2022
94f2a7a
Add color
Jun 22, 2022
02a5ff4
Fix one-week-time Tag
Jun 22, 2022
982d8f3
Remove debug output
Jun 22, 2022
7e69703
Add corner tag styling
Jun 22, 2022
c010438
Update dummy data generation
Jun 22, 2022
845eadb
Add sharingSet update on merge
Jun 22, 2022
7374685
Add fonts locally
Jun 22, 2022
9f170cc
Merge remote-tracking branch 'origin/dashboard_cards' into awake
b3n4kh Jun 22, 2022
f3f7b91
Merge remote-tracking branch 'origin/main' into awake
b3n4kh Jun 22, 2022
700a353
fix merge errors after rebase to Taranis 22.0.5
b3n4kh Jun 22, 2022
fc40fae
Improve efficiency
Jun 23, 2022
c334ccd
Merge remote-tracking branch 'origin/dashboard_cards' into awake
b3n4kh Jun 23, 2022
57fc6fe
Simplify store
Jun 29, 2022
8ac0d56
Add loader component
Jun 29, 2022
9ab1250
Use new store-filter structure
Jun 29, 2022
5a5a3a4
Refactor item loading
Jun 29, 2022
a36449a
Fix topic loader
Jun 29, 2022
85b27c0
Fix item loading when list size reduces
Jun 30, 2022
72e7b26
Use correct action mappers
Jun 30, 2022
3f617c4
multiple database changes
b3n4kh Jun 30, 2022
a072aed
Merge remote-tracking branch 'origin/dashboard_cards' into awake
b3n4kh Jun 30, 2022
99f1e05
Remove item from current view on delete
Jul 7, 2022
89fc113
Apply custom components
Jul 7, 2022
4940e3f
Simplify styles
Jul 7, 2022
dec1105
Add custom components
Jul 7, 2022
f0c0a1e
Use choose-dialog on remove item
Jul 7, 2022
e4ee6f5
Add styles
Jul 7, 2022
77abc76
Merge branch 'dashboard_cards' of https://github.com/ait-cs-IaaS/Tara…
Jul 7, 2022
63aa701
Add remove from topic
Jul 7, 2022
82fa364
Emit remove from topic
Jul 7, 2022
370875d
Rename handler
Jul 7, 2022
8caf79f
Fix color propagation
Jul 7, 2022
87738a9
Rename handler
Jul 7, 2022
74c948d
Rename handler
Jul 7, 2022
eab9456
Inherit fill color of svg
Jul 7, 2022
c1aea53
Add loading indicator
Jul 7, 2022
8c4d366
Add manage tags item action
Jul 7, 2022
a9d332d
Fix styles
Jul 7, 2022
4dd22b4
Add divider for xs resolutions
Jul 7, 2022
f3fc4ae
Rename folder
Jul 7, 2022
38c3f09
Fix tooltip
Jul 7, 2022
2b0411b
Limit infiniteScrolling
Jul 7, 2022
981833a
Rename Component
Jul 7, 2022
4b35e42
Add popup component placeholder
Jul 7, 2022
09c9e04
Fix double loader
Jul 7, 2022
695efc9
Make topic remove conditional
Jul 7, 2022
66f5c8e
nlp bot
b3n4kh Jul 7, 2022
43eb51c
Merge remote-tracking branch 'origin/main' into awake
b3n4kh Jul 7, 2022
ef5a24d
Merge remote-tracking branch 'origin/dashboard_cards' into awake
b3n4kh Jul 7, 2022
31eaec5
Add switch component
Jul 7, 2022
b683f43
Use custom components
Jul 7, 2022
31bbfe7
Simplify style
Jul 7, 2022
23bc83c
Fix popups
Jul 7, 2022
db02b52
Update styles
Jul 7, 2022
e3e72c0
add source select
b3n4kh Jul 8, 2022
4ef852f
map correctly
b3n4kh Jul 8, 2022
199029d
newsitems from api
b3n4kh Jul 11, 2022
308001f
Add helper functions
Jul 11, 2022
15356e1
Fix rendering of meta data
Jul 11, 2022
4f334b5
Merge branch 'dashboard_cards' into awake
Jul 11, 2022
ec88bd5
Refactor meta data getters
Jul 11, 2022
eb9790c
fix tags
b3n4kh Jul 11, 2022
688791d
fix tags
b3n4kh Jul 11, 2022
47ca2d2
Limit width of tags
Jul 12, 2022
577ffb5
Add Tag max width in styles
Jul 12, 2022
9f99e77
Adapt popup close-button
Jul 12, 2022
adb90a8
new osint-source-list
b3n4kh Jul 12, 2022
e4a53cc
get source list from store
b3n4kh Jul 13, 2022
5c49295
update newsitemdata endpoint
b3n4kh Jul 14, 2022
984ef48
update newsitemdata endpoint
b3n4kh Jul 14, 2022
e87cafc
update newsitemdata endpoint
b3n4kh Jul 14, 2022
5bcaaa0
add default aggregate endpoint
b3n4kh Jul 14, 2022
4561f23
clean app startup
b3n4kh Jul 16, 2022
5762ab1
install pre-commit
b3n4kh Jul 29, 2022
b300f43
update CICD
b3n4kh Jul 29, 2022
2a3e25c
Merge branch 'cicd' into awake
b3n4kh Jul 29, 2022
bfe0f56
allow package_write to cicd.yml
b3n4kh Jul 29, 2022
fd8dd36
add cicd for all containers
b3n4kh Jul 29, 2022
f869842
update deps and base images
b3n4kh Jul 29, 2022
02c2c6a
update gui for awake style
b3n4kh Jul 29, 2022
654279d
change presenter base image
b3n4kh Jul 30, 2022
8f4bef9
update docker-compose
b3n4kh Jul 31, 2022
5494861
cleanup dockerfiles
b3n4kh Jul 31, 2022
1f59bdb
pumb flask-restful
b3n4kh Jul 31, 2022
bb7e563
prevent double migrate database
b3n4kh Jul 31, 2022
3b1075c
Merge branch 'main' into add_tests
b3n4kh Aug 1, 2022
69220d0
add usersetup endpoint
b3n4kh Aug 2, 2022
8108011
add preseed phase to db_manager
b3n4kh Aug 3, 2022
cb65319
seed in app
b3n4kh Aug 3, 2022
7fb0bfc
pre seed
b3n4kh Aug 4, 2022
4fdb84c
split cicd to specific jobs
b3n4kh Aug 4, 2022
fab97cb
pre seed permissions
b3n4kh Aug 4, 2022
d366f33
add missing dependency
b3n4kh Aug 4, 2022
7586ace
add no traefik compose
b3n4kh Aug 4, 2022
2752fa8
Merge branch 'add_tests' into awake
b3n4kh Aug 10, 2022
b2c7bcc
fix
b3n4kh Aug 10, 2022
297598b
Merge branch 'awake' of github.com:ait-cs-IaaS/Taranis-NG into awake
b3n4kh Aug 10, 2022
fd6b8d8
package publisher
b3n4kh Aug 10, 2022
ba3bf53
add pytest
b3n4kh Aug 11, 2022
8d2230d
refactor presenters
b3n4kh Aug 11, 2022
b395893
presenter migration WIP
b3n4kh Aug 11, 2022
7ab8161
refactor core
b3n4kh Aug 11, 2022
65fbfb3
refactore core for pytest and packeging
b3n4kh Aug 18, 2022
44ee1c3
fix login redirect
b3n4kh Aug 19, 2022
218b8fb
core testable
b3n4kh Aug 22, 2022
f53e76e
migrate bots
b3n4kh Aug 23, 2022
304052d
refactor bots
b3n4kh Aug 24, 2022
0310b23
refactor collectors
b3n4kh Aug 24, 2022
8bbae77
cleanup presenter schema
b3n4kh Aug 24, 2022
d17f5c9
cleanup presenters
b3n4kh Aug 24, 2022
4ed400d
cleanup requiremnets
b3n4kh Aug 25, 2022
e32e174
upgrade jwt
b3n4kh Aug 25, 2022
b4f6a8e
switch to modules
b3n4kh Aug 25, 2022
82d0bb2
rename CI Tasks
b3n4kh Aug 25, 2022
45f5dd8
rename CI Tasks
b3n4kh Aug 25, 2022
a6cbaf4
unify base images
b3n4kh Aug 25, 2022
b8d9070
fix Collector font
b3n4kh Aug 26, 2022
75dda03
fix Core depenedncies
b3n4kh Aug 26, 2022
0a8585e
cleanup collectors
b3n4kh Aug 26, 2022
a980088
add core tests
b3n4kh Aug 28, 2022
33dec3d
fix typo in core ci
b3n4kh Aug 29, 2022
c2ca81b
add missing depenedcy to core
b3n4kh Aug 29, 2022
21a3a14
core ci
b3n4kh Aug 29, 2022
4926d4e
use new jwt schema
b3n4kh Aug 29, 2022
5b3b6cf
tagged release
b3n4kh Aug 29, 2022
a6dd4e6
add content permission
b3n4kh Aug 29, 2022
322639c
replace core with shared
b3n4kh Aug 29, 2022
ca68b44
switch to shared module
b3n4kh Aug 29, 2022
24183fa
use command not entrypoint
b3n4kh Aug 29, 2022
b9d2d92
db uri validotor
b3n4kh Aug 29, 2022
3e5c1c4
default osint source group
b3n4kh Aug 29, 2022
36aeb78
switch core do shared shema
b3n4kh Aug 30, 2022
00b7125
pre seed wordlist
b3n4kh Aug 30, 2022
49f23ab
fix shared collector_node
b3n4kh Aug 31, 2022
5c52bca
fix typo in publishers
b3n4kh Aug 31, 2022
3bc75fd
update stuff
b3n4kh Aug 31, 2022
6c9383b
update package.json
b3n4kh Aug 31, 2022
1630314
collector cleanup
b3n4kh Aug 31, 2022
d400061
cleanup gui
b3n4kh Sep 1, 2022
5a0472c
cleanup ACL check
b3n4kh Sep 1, 2022
82f8cd8
various fixes
b3n4kh Sep 2, 2022
2bdf1db
updtae gui dockerfile
b3n4kh Sep 2, 2022
053bcdf
collector refactor
b3n4kh Sep 4, 2022
6d5fd4a
refactore logging
b3n4kh Sep 5, 2022
28e9977
allow collector selfregistration
b3n4kh Sep 5, 2022
a1c2400
compose file update
b3n4kh Sep 5, 2022
2aeedab
new collecter
b3n4kh Sep 5, 2022
6b49156
improve rss collector
b3n4kh Sep 6, 2022
a969649
newsitemdetail
b3n4kh Sep 6, 2022
70b9a0f
rss collector hardening
b3n4kh Sep 6, 2022
ad390b8
fix core filter
b3n4kh Sep 7, 2022
1cac54d
update github runner baseimage
b3n4kh Sep 7, 2022
286ed90
gui cleanup
b3n4kh Sep 13, 2022
0785f65
node auto registration
b3n4kh Oct 6, 2022
34e771d
correct indentation
i-work-at-ait Oct 10, 2022
d54db98
get new core api endpoints working
b3n4kh Oct 12, 2022
3d575d9
start refactoring store endpoints
b3n4kh Oct 13, 2022
e72fb5d
refactore analyze
b3n4kh Oct 14, 2022
cb4b456
Merge branch 'main' into awake
b3n4kh Oct 14, 2022
137ab36
refactore frontend
b3n4kh Oct 14, 2022
cde760d
Merge branch 'feature/refactor_frontend' into awake
b3n4kh Oct 14, 2022
845756d
lost file
b3n4kh Oct 14, 2022
56f7294
debug ci/cd pytest error
b3n4kh Oct 14, 2022
5f43074
OpenAPI (#16)
b3n4kh Oct 14, 2022
d6b79bc
cleaner db_seed_manager
b3n4kh Oct 14, 2022
62d7172
add pytest dockerfile
b3n4kh Oct 14, 2022
5528344
cleanup
b3n4kh Oct 14, 2022
4bb6d9d
add openapi to core
b3n4kh Oct 17, 2022
2472059
make side navbar optional
b3n4kh Oct 17, 2022
a6bdb90
pip packages to pypi
b3n4kh Oct 18, 2022
3c9bdd8
consolidate nodes
b3n4kh Oct 21, 2022
f709883
rename actions
b3n4kh Oct 21, 2022
f22b5db
datatable for config
b3n4kh Oct 23, 2022
ec62c5f
fix ci/cd
b3n4kh Oct 23, 2022
f4a125a
refactor for linting
b3n4kh Oct 23, 2022
f89d9f7
Merge branch 'main' into awake
b3n4kh Dec 5, 2022
41f1904
update dockerfiles
b3n4kh Dec 6, 2022
5a7e38e
update dockerfile bot
b3n4kh Dec 6, 2022
2a93507
update dockerfile bot
b3n4kh Dec 6, 2022
86e18b9
cleanup gui after merge
b3n4kh Dec 6, 2022
9f93170
cleanup gui after merge
b3n4kh Dec 6, 2022
6e8668a
cleanup after main merge
b3n4kh Dec 13, 2022
1043f80
Merge branch 'awake' of github.com:ait-cs-IaaS/Taranis-NG into awake
b3n4kh Dec 13, 2022
53a47b4
cleanup after main merge
b3n4kh Dec 13, 2022
c2b55dc
Table magic
b3n4kh Dec 15, 2022
971e62f
hotfix docker-compose file
b3n4kh Dec 16, 2022
b666a0a
remove collectors
b3n4kh Dec 19, 2022
5599b70
configtable getting useful
b3n4kh Jan 4, 2023
f7ebec1
unify gui settings - add worker
b3n4kh Jan 10, 2023
2f4da49
add presenter ep
b3n4kh Jan 16, 2023
8eed208
Collector Content Cleanup (#21)
b3n4kh Jan 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .github/workflows/docker_build_bots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
- 'docker/entrypoint.sh'
- 'docker/gunicorn_conf.py'
branches:
- main
- master
- awake

permissions:
packages: write

jobs:
build:
name: build docker
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -35,4 +36,5 @@ jobs:
file: docker/Dockerfile.bots
push: true
tags: |
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-bots:latest
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-bots:${{ github.ref_name }}
6 changes: 4 additions & 2 deletions .github/workflows/docker_build_collectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
- 'docker/entrypoint.sh'
- 'docker/gunicorn_conf.py'
branches:
- main
- master
- awake

permissions:
packages: write

jobs:
build:
name: build docker
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -35,4 +36,5 @@ jobs:
file: docker/Dockerfile.collectors
push: true
tags: |
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-collectors:latest
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-collectors:${{ github.ref_name }}
54 changes: 51 additions & 3 deletions .github/workflows/docker_build_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,62 @@ on:
- 'docker/entrypoint.sh'
- 'docker/gunicorn_conf.py'
branches:
- main
- master
- awake
tags:
- '**'

permissions:
packages: write
contents: write

jobs:
build:
test:
name: pytest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: test
working-directory: src/core
run: |
python -m pip install --upgrade -r ../../dev_requirements.txt
pip install -e .
echo "Starting Pytest"
pytest

build_wheel:
name: build wheel
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: build
working-directory: src/core
run: |
python -m pip install --upgrade pip setuptools wheel build
python -m build
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
src/core/dist/taranis_ng_core-*.whl
src/core/dist/taranis_ng_core-*.tar.gz
- name: Release to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/')
with:
password: ${{ secrets.PYPI_API_TOKEN_CORE }}

build_docker:
name: build docker
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -35,4 +82,5 @@ jobs:
file: docker/Dockerfile.core
push: true
tags: |
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-core:latest
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-core:${{ github.ref_name }}
6 changes: 4 additions & 2 deletions .github/workflows/docker_build_gui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ on:
- 'docker/Dockerfile.gui'
- 'VERSION.md'
branches:
- main
- master
- awake

permissions:
packages: write

jobs:
build:
name: build docker
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -32,4 +33,5 @@ jobs:
file: docker/Dockerfile.gui
push: true
tags: |
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-gui:latest
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-gui:${{ github.ref_name }}
6 changes: 4 additions & 2 deletions .github/workflows/docker_build_presenters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
- 'docker/entrypoint.sh'
- 'docker/gunicorn_conf.py'
branches:
- main
- master
- awake

permissions:
packages: write

jobs:
build:
name: build docker
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -35,4 +36,5 @@ jobs:
file: docker/Dockerfile.presenters
push: true
tags: |
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-presenters:latest
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-presenters:${{ github.ref_name }}
6 changes: 4 additions & 2 deletions .github/workflows/docker_build_publishers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ on:
- 'docker/entrypoint.sh'
- 'docker/gunicorn_conf.py'
branches:
- main
- master
- awake

permissions:
packages: write

jobs:
build:
name: build docker
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -35,4 +36,5 @@ jobs:
file: docker/Dockerfile.publishers
push: true
tags: |
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-publishers:latest
ghcr.io/${{ env.GHCR_OWNER }}/taranis-ng-publishers:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion .github/workflows/docker_build_shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel build
python -m build
- name: Release
- name: Release to GitHub
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
jobs:
lint:
name: lint & check formatting
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.8', '3.10']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: lint with black
uses: rickstaa/action-black@v1
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# built and cached files
venv/
.envrc
__pycache__/
*.pyc
node_modules/
dist/
build/
.envrc
*.egg-info/
.installed.cfg
*.egg
Expand All @@ -20,6 +20,7 @@ build/

# sensitive data not to be commited
.env.local
docker/.env
.env.*.local
src/.env
*.pem
Expand Down
8 changes: 8 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
flake8
black
watchdog
pytest
pre-commit
build
wheel
setuptools
16 changes: 13 additions & 3 deletions docker/.env → docker/.env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# General
COMPOSE_PROJECT_NAME=taranis-ng
DOCKER_IMAGE_NAMESPACE=skcert
HTTP_PROXY=
HTTPS_PROXY=

Expand All @@ -9,7 +10,8 @@ TZ=Europe/Bratislava
# Default passwords. CHANGE THESE FOR PRODUCTION!
POSTGRES_PASSWORD=supersecret
JWT_SECRET_KEY=supersecret
COLLECTOR_PRESENTER_PUBLISHER_API_KEY=supersecret
API_KEY=supersecret
KEYCLOAK_PASSWORD=supersecret

# Paths
CVE_UPDATE_FILE=/data/cve_dictionary.xml
Expand All @@ -19,13 +21,21 @@ CPE_UPDATE_FILE=/data/cpe_dictionary.xml
TARANIS_NG_HOSTNAME=localhost
TARANIS_NG_HTTPS_PORT=4443
TARANIS_NG_HTTP_PORT=8080
TARANIS_NG_HTTPS_URI=https://localhost:4443

DB_URL=localhost
DB_DATABASE=taranis
DB_USER=taranis
DB_PASSWORD=supersecret

TARANIS_NG_HTTPS_URI=https://taranis:4443
KEYCLOAK_DOMAIN=keycloak.local
TRAEFIK_MANAGEMENT_PORT=127.0.0.1:8081

# Versions
REDIS_TAG=6-alpine
POSTGRES_TAG=13-alpine
TARANIS_NG_TAG=v22.05.1
TARANIS_NG_TAG=latest
KEYCLOAK_TAG=16.1.0

# Limits
DB_SHARED_BUFFERS=64MB
Expand Down
46 changes: 17 additions & 29 deletions docker/Dockerfile.bots
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-alpine3.14 AS build_shared
FROM python:3-slim AS build_shared

WORKDIR /build_shared/

Expand All @@ -7,38 +7,28 @@ COPY ./src/shared/. .
RUN python -m build



FROM python:3.7-alpine3.14 AS production

FROM python:3-slim
WORKDIR /app/

# upgrade pip
RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade pip wheel

# install "shared" package from build_shared stage
# TODO: somehow squash the following two layers into one to conserve space
# install dependencies
RUN apt-get update && apt-get upgrade -y
COPY ./src/bots/setup.cfg ./src/bots/setup.py /app/

COPY --from=build_shared /build_shared/dist/taranis_ng_shared-*.whl custom_packages/
RUN pip install --no-cache-dir ./custom_packages/taranis_ng_shared-*.whl && rm -rf ./custom_packages/

# install dependencies
COPY ./src/bots/requirements.txt /app/requirements.txt
RUN \
apk add --no-cache --virtual .build-deps \
gcc \
g++ \
make \
musl-dev \
python3-dev \
libffi-dev && \
pip install --no-cache-dir -r /app/requirements.txt && \
apk --purge del .build-deps

COPY ./docker/start.sh /start.sh
RUN chmod +x /start.sh

COPY ./docker/prestart.sh /app/prestart.sh
RUN chmod +x /app/prestart.sh
RUN apt-get install --no-install-recommends -y \
build-essential \
python3-dev \
git \
cmake && \
pip install -e /app/ && \
apt-get purge -y build-essential python3-dev && \
apt-get autoremove -y --purge &&\
apt-get clean

COPY ./docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand All @@ -51,10 +41,8 @@ EXPOSE 80

# setup environment variables
ENV PYTHONPATH=/app
ENV MODULE_NAME run
ENV VARIABLE_NAME app
ENV APP_MODULE run:app
ENV GUNICORN_CMD_ARGS --timeout 120
ENV WORKERS_PER_CORE 8
ENV WORKERS_PER_CORE 4

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/start.sh"]
Loading