-
Notifications
You must be signed in to change notification settings - Fork 0
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
25 changed files
with
97 additions
and
313 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
.DS_Store | ||
__pycache__ | ||
*.pyc | ||
.git | ||
.gitignore | ||
config.py | ||
ksi-py3-venv | ||
.ipynb_checkpoints | ||
|
||
.idea | ||
|
||
build/* | ||
*_build/*.html | ||
*_build/archived/* | ||
|
||
.env | ||
*.secret | ||
|
||
!**/.gitkeep | ||
!**/index.html | ||
|
||
docker-compose.yaml | ||
docker/Dockerfile |
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,33 @@ | ||
name: Docker Compose Build and Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
build_and_push: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repository, including submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
path: web | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker images | ||
working-directory: ./web | ||
run: | | ||
docker compose build | ||
docker compose push |
This file was deleted.
Oops, something went wrong.
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,32 +1,11 @@ | ||
KSI_TARGETS=$(patsubst notebooks/%.ipynb, ksi_build/%.html, $(wildcard notebooks/*.ipynb)) | ||
NASKOC_TARGETS=$(patsubst notebooks/%.ipynb, naskoc_build/%.html, $(wildcard notebooks/*.ipynb)) | ||
DOCKER_TARGETS=$(patsubst notebooks/%.ipynb, docker_build/%.html, $(wildcard notebooks/*.ipynb)) | ||
TARGETS=$(patsubst notebooks/%.ipynb, build/%.html, $(wildcard notebooks/*.ipynb)) | ||
|
||
ksi: $(KSI_TARGETS) | ||
naskoc: $(NASKOC_TARGETS) | ||
docker: $(DOCKER_TARGETS) | ||
all: $(KSI_TARGETS) $(NASKOC_TARGETS) | ||
all: $(TARGETS) | ||
|
||
include .env | ||
|
||
# Note: Race condition on file db_uri.secret | ||
|
||
ksi_build/%.html: notebooks/%.ipynb | ||
echo $(DB_URI_KSI) > db_uri.secret | ||
ksi-py3-venv/bin/python3 export_monitoring_notebook $< $@ | ||
rm db_uri.secret || true | ||
|
||
naskoc_build/%.html: notebooks/%.ipynb | ||
echo $(DB_URI_NASKOC) > db_uri.secret | ||
ksi-py3-venv/bin/python3 export_monitoring_notebook $< $@ | ||
rm db_uri.secret || true | ||
|
||
docker_build/%.html: notebooks/%.ipynb | ||
build/%.html: notebooks/%.ipynb | ||
python3 export_monitoring_notebook $< $@ | ||
|
||
clean: | ||
rm -rf $(KSI_TARGETS) | ||
rm -rf $(NASKOC_TARGETS) | ||
rm -rf $(DOCKER_TARGETS) | ||
|
||
.PHONY: all clean |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
SQL_ALCHEMY_URI = 'mariadb+pymysql://user:password@server/db?charset=utf8mb4' |
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,17 +1,16 @@ | ||
version: '2' | ||
|
||
services: | ||
dashboardbuild: | ||
build: . | ||
ksi-dashboard: | ||
build: | ||
context: . | ||
dockerfile: docker/Dockerfile | ||
container_name: ksi-dashboard | ||
image: fi0ksi/ksi-dashboard | ||
volumes: | ||
# - ./:/myapp | ||
- ./docker_build:/myapp/docker_build | ||
ports: | ||
- "8080:8080" | ||
# entrypoint: /myapp/build_in_docker.sh | ||
|
||
# If you want manual bash, do the following. | ||
# 1. Uncomment the following line: | ||
# entrypoint: tail -f /dev/null # Uncomment this if you want to start bash manually after the | ||
# 2. Do `docker-compose up -d --build` | ||
# 3. After it finishes, run `docker exec -it web-frontend_ember_1 /bin/bash` | ||
- ./build:/myapp/build | ||
- ./config.py:/myapp/config.py:ro | ||
# ports: | ||
# - "127.0.0.1:8080:8080" | ||
entrypoint: /bin/bash | ||
command: /myapp/docker/build_in_docker.sh |
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,16 @@ | ||
FROM python:3.9 | ||
|
||
RUN pip3 install jupyter==1.0.0 wheel setuptools notebook==6.4.11 | ||
|
||
EXPOSE 8080 | ||
WORKDIR /myapp | ||
|
||
COPY requirements.txt ./ | ||
|
||
RUN pip3 install -r requirements.txt | ||
|
||
COPY ./ /myapp | ||
|
||
# run ember server on container start | ||
ENTRYPOINT ["jupyter"] | ||
CMD ["notebook", "--no-browser", "--ip=0.0.0.0", "--port=8080", "--allow-root"] |
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 |
---|---|---|
|
@@ -4,5 +4,4 @@ set -e | |
|
||
cd /myapp | ||
|
||
make clean | ||
make docker_all | ||
make all |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 +1,11 @@ | ||
# This is aimed at Python 3.9 | ||
|
||
# requires to run first: python3 -m pip install wheel setuptools | ||
|
||
jinja2<3.1 | ||
jinja2==3.0.3 | ||
jupyter-client==6.1.12 | ||
|
||
jupyter | ||
matplotlib | ||
sqlalchemy | ||
pandas | ||
seaborn | ||
numpy | ||
mysqlclient | ||
hide-code | ||
jupyter==1.0.0 | ||
matplotlib==3.5.2 | ||
sqlalchemy==1.4.36 | ||
pandas==1.4.2 | ||
seaborn==0.11.2 | ||
numpy==1.22.3 | ||
hide-code==0.6.0 | ||
PyMySQL==1.1.1 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.