diff --git a/docker-compose.yml b/docker-compose.yml index 51bb966e7d5d92ce003f5d410e4fae717ee0fea9..2b5bcb74933afe8050dd699877d9c4557fa2390b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,47 +1,51 @@ version: '3.7' services: - database: - build: ./neo4j - environment: - - NEO4J_AUTH=neo4j/test - ports: - - "7474:7474" - - "7687:7687" - volumes: - - ./neo4j/import:/var/lib/neo4j/import - - ./neo4j/data:/var/lib/neo4j/data - container_name: neo4j - redis: - image: "redis:alpine" - ports: - - "6379:6379" - redis-client: - build: ./redis - depends_on: - - redis - sg-backend: - build: ./sg-backend - command: sh -c "/wait && uvicorn main:app --reload --host 0.0.0.0" - environment: - - FRONTEND_URL="http://localhost" - - NEO4J_URI=neo4j://database:7687 - - NEO4J_USER=neo4j - - NEO4J_PASSWORD=test - - WAIT_HOSTS=database:7474 - - WAIT_HOSTS_TIMEOUT=300 - - WAIT_SLEEP_INTERVAL=5 - - WAIT_HOST_CONNECT_TIMEOUT=30 - depends_on: - - database - - redis - ports: - - "8000:8000" - sg-frontend: - build: ./sg-frontend - environment: - - VITE_BACKEND_URL=http://sg-backend:8000 - ports: - - "4173:4173" - depends_on: - - sg-backend \ No newline at end of file + database: + build: ./neo4j + environment: + - NEO4J_AUTH=neo4j/test + ports: + - "7474:7474" + - "7687:7687" + volumes: + - ./neo4j/import:/var/lib/neo4j/import + - ./neo4j/data:/var/lib/neo4j/data + container_name: neo4j + redis: + image: "redis:alpine" + ports: + - "6379:6379" + redis-client: + build: ./redis + depends_on: + - redis + sg-backend: + build: ./sg-backend + command: sh -c "/wait && uvicorn main:app --reload --host 0.0.0.0" + environment: + - FRONTEND_URL="http://localhost" + - NEO4J_URI=neo4j://database:7687 + - NEO4J_USER=neo4j + - NEO4J_PASSWORD=test + - WAIT_HOSTS=database:7474 + - WAIT_HOSTS_TIMEOUT=300 + - WAIT_SLEEP_INTERVAL=5 + - WAIT_HOST_CONNECT_TIMEOUT=30 + volumes: + - ./sg-backend:/code + depends_on: + - database + - redis + ports: + - "8000:8000" + sg-frontend: + build: ./sg-frontend + environment: + - VITE_BACKEND_URL=http://sg-backend:8000 + volumes: + - ./sg-frontend:/app + ports: + - "5173:5173" + depends_on: + - sg-backend \ No newline at end of file diff --git a/redis/Dockerfile b/redis/Dockerfile index c3172168f3dc8f9d2af5294b6b1201ab60130b47..9f99845f56a5d5262ae6b5e8e2bd001515e28eb6 100644 --- a/redis/Dockerfile +++ b/redis/Dockerfile @@ -1,4 +1,4 @@ -FROM python:latest +FROM python:3.10-slim COPY client_example.py ./client.py COPY requirements.txt ./requirements.txt RUN pip3 install -r requirements.txt diff --git a/sg-backend/.gitignore b/sg-backend/.gitignore index 7eadfc2e0d6d84ab33f21560c7a679482c5f6d07..c8cf1b4303136ebcf07ce04dda4b39280b4c26fe 100644 --- a/sg-backend/.gitignore +++ b/sg-backend/.gitignore @@ -1 +1,2 @@ -__pycache \ No newline at end of file +__pycache +.idea/ \ No newline at end of file diff --git a/sg-backend/Dockerfile b/sg-backend/Dockerfile index ea4a808ec64b50cae1dc7a4bab3527f8da1f8e34..864704edf06108efae6e23eaa9af5600964c3f9b 100644 --- a/sg-backend/Dockerfile +++ b/sg-backend/Dockerfile @@ -1,10 +1,18 @@ -FROM python:latest -COPY ./* . -RUN pip3 install -r requirements.txt +FROM python:3.10-slim +WORKDIR /code +ENV POETRY_VERSION=1.2.2 + +RUN pip install "poetry==$POETRY_VERSION" + +COPY poetry.lock pyproject.toml /code/ + +#RUN pip3 install -r requirements.txt + +RUN poetry config virtualenvs.create false && poetry install --no-interaction --no-ansi +COPY . /code EXPOSE 8000 ENV WAIT_VERSION 2.7.2 ADD https://github.com/ufoscout/docker-compose-wait/releases/download/$WAIT_VERSION/wait /wait -RUN chmod +x /wait - +RUN chmod +x /wait \ No newline at end of file diff --git a/sg-backend/export_poetry_requirements.sh b/sg-backend/export_poetry_requirements.sh new file mode 100755 index 0000000000000000000000000000000000000000..3d9ffc248c8cde04b5a8c256025c2694736f9321 --- /dev/null +++ b/sg-backend/export_poetry_requirements.sh @@ -0,0 +1 @@ +poetry export -f requirements.txt --output requirements.txt \ No newline at end of file diff --git a/sg-backend/poetry.lock b/sg-backend/poetry.lock index 85f00f4412394e4603a2f3a828e2e73b85718b59..2ff5d3551a1cf0e58c831c3cd4b2f026cf6e171d 100644 --- a/sg-backend/poetry.lock +++ b/sg-backend/poetry.lock @@ -15,6 +15,14 @@ doc = ["packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] test = ["contextlib2", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (<0.15)", "uvloop (>=0.15)"] trio = ["trio (>=0.16)"] +[[package]] +name = "async-timeout" +version = "4.0.2" +description = "Timeout context manager for asyncio programs" +category = "main" +optional = false +python-versions = ">=3.6" + [[package]] name = "click" version = "8.1.3" @@ -52,6 +60,26 @@ dev = ["autoflake (>=1.4.0,<2.0.0)", "flake8 (>=3.8.3,<6.0.0)", "pre-commit (>=2 doc = ["mdx-include (>=1.4.1,<2.0.0)", "mkdocs (>=1.1.2,<2.0.0)", "mkdocs-markdownextradata-plugin (>=0.1.7,<0.3.0)", "mkdocs-material (>=8.1.4,<9.0.0)", "pyyaml (>=5.3.1,<7.0.0)", "typer (>=0.4.1,<0.7.0)"] test = ["anyio[trio] (>=3.2.1,<4.0.0)", "black (==22.8.0)", "databases[sqlite] (>=0.3.2,<0.7.0)", "email-validator (>=1.1.1,<2.0.0)", "flake8 (>=3.8.3,<6.0.0)", "flask (>=1.1.2,<3.0.0)", "httpx (>=0.23.0,<0.24.0)", "isort (>=5.0.6,<6.0.0)", "mypy (==0.971)", "orjson (>=3.2.1,<4.0.0)", "passlib[bcrypt] (>=1.7.2,<2.0.0)", "peewee (>=3.13.3,<4.0.0)", "pytest (>=7.1.3,<8.0.0)", "pytest-cov (>=2.12.0,<4.0.0)", "python-jose[cryptography] (>=3.3.0,<4.0.0)", "python-multipart (>=0.0.5,<0.0.6)", "pyyaml (>=5.3.1,<7.0.0)", "requests (>=2.24.0,<3.0.0)", "sqlalchemy (>=1.3.18,<1.5.0)", "types-orjson (==3.6.2)", "types-ujson (==5.4.0)", "ujson (>=4.0.1,!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,<6.0.0)"] +[[package]] +name = "fastapi-cache2" +version = "0.1.9" +description = "Cache for FastAPI" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" + +[package.dependencies] +fastapi = "*" +pendulum = "*" +redis = {version = ">=4.2.0rc1,<5.0.0", optional = true, markers = "extra == \"redis\" or extra == \"all\""} +uvicorn = "*" + +[package.extras] +all = ["aiobotocore (>=1.4.1,<2.0.0)", "aiomcache", "redis (>=4.2.0rc1,<5.0.0)"] +dynamodb = ["aiobotocore (>=1.4.1,<2.0.0)"] +memcache = ["aiomcache"] +redis = ["redis (>=4.2.0rc1,<5.0.0)"] + [[package]] name = "h11" version = "0.13.0" @@ -79,6 +107,18 @@ python-versions = ">=3.7" [package.dependencies] pytz = "*" +[[package]] +name = "pendulum" +version = "2.1.2" +description = "Python datetimes made easy" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + +[package.dependencies] +python-dateutil = ">=2.6,<3.0" +pytzdata = ">=2020.1" + [[package]] name = "pydantic" version = "1.10.2" @@ -94,6 +134,17 @@ typing-extensions = ">=4.1.0" dotenv = ["python-dotenv (>=0.10.4)"] email = ["email-validator (>=1.0.3)"] +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" + +[package.dependencies] +six = ">=1.5" + [[package]] name = "pytz" version = "2022.2.1" @@ -102,6 +153,37 @@ category = "main" optional = false python-versions = "*" +[[package]] +name = "pytzdata" +version = "2020.1" +description = "The Olson timezone database for Python." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] +name = "redis" +version = "4.4.0rc4" +description = "Python client for Redis database and key-value store" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +async-timeout = ">=4.0.2" + +[package.extras] +hiredis = ["hiredis (>=1.0.0)"] +ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"] + +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + [[package]] name = "sniffio" version = "1.3.0" @@ -150,13 +232,17 @@ standard = ["colorama (>=0.4)", "httptools (>=0.4.0)", "python-dotenv (>=0.13)", [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "92d7313563fc036bb36381d94d139862865b3a018e3849a340b8bc16513df739" +content-hash = "f15fbf471411ab63fc5fb485e394962433498aa9d266752113e6c296bcb9210e" [metadata.files] anyio = [ {file = "anyio-3.6.1-py3-none-any.whl", hash = "sha256:cb29b9c70620506a9a8f87a309591713446953302d7d995344d0d7c6c0c9a7be"}, {file = "anyio-3.6.1.tar.gz", hash = "sha256:413adf95f93886e442aea925f3ee43baa5a765a64a0f52c6081894f9992fdd0b"}, ] +async-timeout = [ + {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, + {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, +] click = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, @@ -169,6 +255,10 @@ fastapi = [ {file = "fastapi-0.85.0-py3-none-any.whl", hash = "sha256:1803d962f169dc9f8dde54a64b22eb16f6d81573f54401971f90f0a67234a8b4"}, {file = "fastapi-0.85.0.tar.gz", hash = "sha256:bb219cfafd0d2ccf8f32310c9a257a06b0210bd8e2a03706a6f5a9f9f1416878"}, ] +fastapi-cache2 = [ + {file = "fastapi-cache2-0.1.9.tar.gz", hash = "sha256:816612f7b29b4ea4ed3b4e03c55b7f96b4e4d6dffce6a95e2cf5cf36a980eaaa"}, + {file = "fastapi_cache2-0.1.9-py3-none-any.whl", hash = "sha256:5b6f32bc8e786d9fffe4f3ef343861cab276acc64fb5d8d09077524743ad3702"}, +] h11 = [ {file = "h11-0.13.0-py3-none-any.whl", hash = "sha256:8ddd78563b633ca55346c8cd41ec0af27d3c79931828beffb46ce70a379e7442"}, {file = "h11-0.13.0.tar.gz", hash = "sha256:70813c1135087a248a4d38cc0e1a0181ffab2188141a93eaf567940c3957ff06"}, @@ -180,6 +270,29 @@ idna = [ neo4j = [ {file = "neo4j-5.0.1.tar.gz", hash = "sha256:2330d1b8295b6afb39f23a001f5b0aecae6ca5895cc5b7af3413e326bbd1979c"}, ] +pendulum = [ + {file = "pendulum-2.1.2-cp27-cp27m-macosx_10_15_x86_64.whl", hash = "sha256:b6c352f4bd32dff1ea7066bd31ad0f71f8d8100b9ff709fb343f3b86cee43efe"}, + {file = "pendulum-2.1.2-cp27-cp27m-win_amd64.whl", hash = "sha256:318f72f62e8e23cd6660dbafe1e346950281a9aed144b5c596b2ddabc1d19739"}, + {file = "pendulum-2.1.2-cp35-cp35m-macosx_10_15_x86_64.whl", hash = "sha256:0731f0c661a3cb779d398803655494893c9f581f6488048b3fb629c2342b5394"}, + {file = "pendulum-2.1.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:3481fad1dc3f6f6738bd575a951d3c15d4b4ce7c82dce37cf8ac1483fde6e8b0"}, + {file = "pendulum-2.1.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9702069c694306297ed362ce7e3c1ef8404ac8ede39f9b28b7c1a7ad8c3959e3"}, + {file = "pendulum-2.1.2-cp35-cp35m-win_amd64.whl", hash = "sha256:fb53ffa0085002ddd43b6ca61a7b34f2d4d7c3ed66f931fe599e1a531b42af9b"}, + {file = "pendulum-2.1.2-cp36-cp36m-macosx_10_15_x86_64.whl", hash = "sha256:c501749fdd3d6f9e726086bf0cd4437281ed47e7bca132ddb522f86a1645d360"}, + {file = "pendulum-2.1.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:c807a578a532eeb226150d5006f156632df2cc8c5693d778324b43ff8c515dd0"}, + {file = "pendulum-2.1.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:2d1619a721df661e506eff8db8614016f0720ac171fe80dda1333ee44e684087"}, + {file = "pendulum-2.1.2-cp36-cp36m-win_amd64.whl", hash = "sha256:f888f2d2909a414680a29ae74d0592758f2b9fcdee3549887779cd4055e975db"}, + {file = "pendulum-2.1.2-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:e95d329384717c7bf627bf27e204bc3b15c8238fa8d9d9781d93712776c14002"}, + {file = "pendulum-2.1.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:4c9c689747f39d0d02a9f94fcee737b34a5773803a64a5fdb046ee9cac7442c5"}, + {file = "pendulum-2.1.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:1245cd0075a3c6d889f581f6325dd8404aca5884dea7223a5566c38aab94642b"}, + {file = "pendulum-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:db0a40d8bcd27b4fb46676e8eb3c732c67a5a5e6bfab8927028224fbced0b40b"}, + {file = "pendulum-2.1.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:f5e236e7730cab1644e1b87aca3d2ff3e375a608542e90fe25685dae46310116"}, + {file = "pendulum-2.1.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:de42ea3e2943171a9e95141f2eecf972480636e8e484ccffaf1e833929e9e052"}, + {file = "pendulum-2.1.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7c5ec650cb4bec4c63a89a0242cc8c3cebcec92fcfe937c417ba18277d8560be"}, + {file = "pendulum-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:33fb61601083f3eb1d15edeb45274f73c63b3c44a8524703dc143f4212bf3269"}, + {file = "pendulum-2.1.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:29c40a6f2942376185728c9a0347d7c0f07905638c83007e1d262781f1e6953a"}, + {file = "pendulum-2.1.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:94b1fc947bfe38579b28e1cccb36f7e28a15e841f30384b5ad6c5e31055c85d7"}, + {file = "pendulum-2.1.2.tar.gz", hash = "sha256:b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207"}, +] pydantic = [ {file = "pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bb6ad4489af1bac6955d38ebcb95079a836af31e4c4f74aba1ca05bb9f6027bd"}, {file = "pydantic-1.10.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a1f5a63a6dfe19d719b1b6e6106561869d2efaca6167f84f5ab9347887d78b98"}, @@ -218,10 +331,26 @@ pydantic = [ {file = "pydantic-1.10.2-py3-none-any.whl", hash = "sha256:1b6ee725bd6e83ec78b1aa32c5b1fa67a3a65badddde3976bca5fe4568f27709"}, {file = "pydantic-1.10.2.tar.gz", hash = "sha256:91b8e218852ef6007c2b98cd861601c6a09f1aa32bbbb74fab5b1c33d4a1e410"}, ] +python-dateutil = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] pytz = [ {file = "pytz-2022.2.1-py2.py3-none-any.whl", hash = "sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197"}, {file = "pytz-2022.2.1.tar.gz", hash = "sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5"}, ] +pytzdata = [ + {file = "pytzdata-2020.1-py2.py3-none-any.whl", hash = "sha256:e1e14750bcf95016381e4d472bad004eef710f2d6417240904070b3d6654485f"}, + {file = "pytzdata-2020.1.tar.gz", hash = "sha256:3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540"}, +] +redis = [ + {file = "redis-4.4.0rc4-py3-none-any.whl", hash = "sha256:7136c511137681002bde316341eeac565eaff966544fefc7729462c2d1c87c67"}, + {file = "redis-4.4.0rc4.tar.gz", hash = "sha256:c8654c5ab28ec0a1876c588cdac2ad4a3dd71919ee21df5fe77dfe846716247f"}, +] +six = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] sniffio = [ {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, @@ -237,4 +366,4 @@ typing-extensions = [ uvicorn = [ {file = "uvicorn-0.18.3-py3-none-any.whl", hash = "sha256:0abd429ebb41e604ed8d2be6c60530de3408f250e8d2d84967d85ba9e86fe3af"}, {file = "uvicorn-0.18.3.tar.gz", hash = "sha256:9a66e7c42a2a95222f76ec24a4b754c158261c4696e683b9dadc72b590e0311b"}, -] +] \ No newline at end of file diff --git a/sg-backend/pyproject.toml b/sg-backend/pyproject.toml index b387455006abe661b14c57c9d8de62297cb55c8f..d81b6c1eecc163da07418df411994bd34f48babc 100644 --- a/sg-backend/pyproject.toml +++ b/sg-backend/pyproject.toml @@ -11,6 +11,7 @@ python = "^3.10" fastapi = "^0.85.0" uvicorn = "^0.18.3" neo4j = "^5.0.1" +fastapi-cache2 = {extras = ["redis"], version = "^0.1.9"} [build-system] diff --git a/sg-backend/requirements.txt b/sg-backend/requirements.txt index ad7fa545ccf438d3ff7926d0de0d5f866e8867bc..1e4892d161fdac62d742b5bc098d111ea7bb639c 100644 --- a/sg-backend/requirements.txt +++ b/sg-backend/requirements.txt @@ -1,12 +1,18 @@ anyio==3.6.1 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:413adf95f93886e442aea925f3ee43baa5a765a64a0f52c6081894f9992fdd0b \ --hash=sha256:cb29b9c70620506a9a8f87a309591713446953302d7d995344d0d7c6c0c9a7be +async-timeout==4.0.2 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15 \ + --hash=sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c click==8.1.3 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e \ --hash=sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48 colorama==0.4.5 ; python_version >= "3.10" and python_version < "4.0" and platform_system == "Windows" \ --hash=sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da \ --hash=sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4 +fastapi-cache2[redis]==0.1.9 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:5b6f32bc8e786d9fffe4f3ef343861cab276acc64fb5d8d09077524743ad3702 \ + --hash=sha256:816612f7b29b4ea4ed3b4e03c55b7f96b4e4d6dffce6a95e2cf5cf36a980eaaa fastapi==0.85.0 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:1803d962f169dc9f8dde54a64b22eb16f6d81573f54401971f90f0a67234a8b4 \ --hash=sha256:bb219cfafd0d2ccf8f32310c9a257a06b0210bd8e2a03706a6f5a9f9f1416878 @@ -18,6 +24,28 @@ idna==3.4 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 neo4j==5.0.1 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:2330d1b8295b6afb39f23a001f5b0aecae6ca5895cc5b7af3413e326bbd1979c +pendulum==2.1.2 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:0731f0c661a3cb779d398803655494893c9f581f6488048b3fb629c2342b5394 \ + --hash=sha256:1245cd0075a3c6d889f581f6325dd8404aca5884dea7223a5566c38aab94642b \ + --hash=sha256:29c40a6f2942376185728c9a0347d7c0f07905638c83007e1d262781f1e6953a \ + --hash=sha256:2d1619a721df661e506eff8db8614016f0720ac171fe80dda1333ee44e684087 \ + --hash=sha256:318f72f62e8e23cd6660dbafe1e346950281a9aed144b5c596b2ddabc1d19739 \ + --hash=sha256:33fb61601083f3eb1d15edeb45274f73c63b3c44a8524703dc143f4212bf3269 \ + --hash=sha256:3481fad1dc3f6f6738bd575a951d3c15d4b4ce7c82dce37cf8ac1483fde6e8b0 \ + --hash=sha256:4c9c689747f39d0d02a9f94fcee737b34a5773803a64a5fdb046ee9cac7442c5 \ + --hash=sha256:7c5ec650cb4bec4c63a89a0242cc8c3cebcec92fcfe937c417ba18277d8560be \ + --hash=sha256:94b1fc947bfe38579b28e1cccb36f7e28a15e841f30384b5ad6c5e31055c85d7 \ + --hash=sha256:9702069c694306297ed362ce7e3c1ef8404ac8ede39f9b28b7c1a7ad8c3959e3 \ + --hash=sha256:b06a0ca1bfe41c990bbf0c029f0b6501a7f2ec4e38bfec730712015e8860f207 \ + --hash=sha256:b6c352f4bd32dff1ea7066bd31ad0f71f8d8100b9ff709fb343f3b86cee43efe \ + --hash=sha256:c501749fdd3d6f9e726086bf0cd4437281ed47e7bca132ddb522f86a1645d360 \ + --hash=sha256:c807a578a532eeb226150d5006f156632df2cc8c5693d778324b43ff8c515dd0 \ + --hash=sha256:db0a40d8bcd27b4fb46676e8eb3c732c67a5a5e6bfab8927028224fbced0b40b \ + --hash=sha256:de42ea3e2943171a9e95141f2eecf972480636e8e484ccffaf1e833929e9e052 \ + --hash=sha256:e95d329384717c7bf627bf27e204bc3b15c8238fa8d9d9781d93712776c14002 \ + --hash=sha256:f5e236e7730cab1644e1b87aca3d2ff3e375a608542e90fe25685dae46310116 \ + --hash=sha256:f888f2d2909a414680a29ae74d0592758f2b9fcdee3549887779cd4055e975db \ + --hash=sha256:fb53ffa0085002ddd43b6ca61a7b34f2d4d7c3ed66f931fe599e1a531b42af9b pydantic==1.10.2 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:05e00dbebbe810b33c7a7362f231893183bcc4251f3f2ff991c31d5c08240c42 \ --hash=sha256:06094d18dd5e6f2bbf93efa54991c3240964bb663b87729ac340eb5014310624 \ @@ -55,9 +83,21 @@ pydantic==1.10.2 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:dd3f9a40c16daf323cf913593083698caee97df2804aa36c4b3175d5ac1b92a2 \ --hash=sha256:e0bedafe4bc165ad0a56ac0bd7695df25c50f76961da29c050712596cf092d6d \ --hash=sha256:e9069e1b01525a96e6ff49e25876d90d5a563bc31c658289a8772ae186552236 +python-dateutil==2.8.2 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ + --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 pytz==2022.2.1 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:220f481bdafa09c3955dfbdddb7b57780e9a94f5127e35456a48589b9e0c0197 \ --hash=sha256:cea221417204f2d1a2aa03ddae3e867921971d0d76f14d87abb4414415bbdcf5 +pytzdata==2020.1 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540 \ + --hash=sha256:e1e14750bcf95016381e4d472bad004eef710f2d6417240904070b3d6654485f +redis==4.4.0rc4 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:7136c511137681002bde316341eeac565eaff966544fefc7729462c2d1c87c67 \ + --hash=sha256:c8654c5ab28ec0a1876c588cdac2ad4a3dd71919ee21df5fe77dfe846716247f +six==1.16.0 ; python_version >= "3.10" and python_version < "4.0" \ + --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ + --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 sniffio==1.3.0 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101 \ --hash=sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384 @@ -69,4 +109,4 @@ typing-extensions==4.3.0 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6 uvicorn==0.18.3 ; python_version >= "3.10" and python_version < "4.0" \ --hash=sha256:0abd429ebb41e604ed8d2be6c60530de3408f250e8d2d84967d85ba9e86fe3af \ - --hash=sha256:9a66e7c42a2a95222f76ec24a4b754c158261c4696e683b9dadc72b590e0311b + --hash=sha256:9a66e7c42a2a95222f76ec24a4b754c158261c4696e683b9dadc72b590e0311b \ No newline at end of file diff --git a/sg-frontend/Dockerfile b/sg-frontend/Dockerfile index 989325261aa005231594a504e24d727df6cd7ee8..2219917038435f9ce3d06302d0ec34a0c4a40f79 100644 --- a/sg-frontend/Dockerfile +++ b/sg-frontend/Dockerfile @@ -1,12 +1,11 @@ -FROM node:18 +FROM node:18-slim WORKDIR /app -COPY . . +COPY . /app #RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm RUN npm install -RUN npm run build ENV VITE_BACKEND_URL=http://sg-backend:8000 -EXPOSE 4173 +EXPOSE 5173 -CMD ["npm","run", "preview", "--","--host", "0.0.0.0", "--port", "4173"] \ No newline at end of file +CMD ["npm","run", "dev", "--","--host", "0.0.0.0", "--port", "5173"] \ No newline at end of file diff --git a/sg-frontend/build.Dockerfile b/sg-frontend/build.Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..18ffdede8dde4c9be06b0d4173f940bf2c073b6f --- /dev/null +++ b/sg-frontend/build.Dockerfile @@ -0,0 +1,12 @@ +FROM node:18-slim +WORKDIR /app +COPY . /app + +#RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm +RUN npm install + +RUN npm run build +ENV VITE_BACKEND_URL=http://sg-backend:8000 +EXPOSE 4173 + +CMD ["npm","run", "preview", "--","--host", "0.0.0.0", "--port", "4173"] \ No newline at end of file diff --git a/sg-frontend/src/routes/Index.svelte b/sg-frontend/src/routes/Index.svelte index e94811c279726a9d065736df3525a143ec277c07..53f779416021abf9da45ec54eadf62c159743d11 100644 --- a/sg-frontend/src/routes/Index.svelte +++ b/sg-frontend/src/routes/Index.svelte @@ -1,5 +1,5 @@ <script lang="ts"> - import SoftwareMerger from "../components/SoftwareMerger.svelte"; + import SoftwareMerger from "../components/SoftwareMerger.svelte"; const link = document.getElementById("sigma"); const home = document.getElementById("home"); const add = document.getElementById("add"); @@ -9,26 +9,29 @@ </script> <div id="app-base"> - <h1>Software Merger</h1> - <p>Find alternatives that have similar features between two softwares.</p> - <br /> - <br /> - <SoftwareMerger /> + <h1>Software Merger</h1> + <p>Find alternatives that have similar features between two softwares.</p> + <br/> + <br/> + <SoftwareMerger/> </div> <style> - .logo { - height: 6em; - padding: 1.5em; - will-change: filter; - } - .logo:hover { - filter: drop-shadow(0 0 2em #646cffaa); - } - .logo.svelte:hover { - filter: drop-shadow(0 0 2em #ff3e00aa); - } - .read-the-docs { - color: #888; - } + .logo { + height: 6em; + padding: 1.5em; + will-change: filter; + } + + .logo:hover { + filter: drop-shadow(0 0 2em #646cffaa); + } + + .logo.svelte:hover { + filter: drop-shadow(0 0 2em #ff3e00aa); + } + + .read-the-docs { + color: #888; + } </style> \ No newline at end of file