Code Monkey home page Code Monkey logo

Comments (6)

cln-io avatar cln-io commented on June 3, 2024 2

I'm not sure its related but I'm running into 500's on /api/v2/health
and the login page isn't shown or is unresponsive.

will investigate

from caldera.

cln-io avatar cln-io commented on June 3, 2024 1

PR included, docker builds fine now, and caldera boots up as expected 🎉

from caldera.

elegantmoose avatar elegantmoose commented on June 3, 2024

It does (need to be updated). We were allowing for a slight delay to make sure Magma was stable before updating the dockerfile. But I see you PR and it looks good. I will try to test it ASAP.

from caldera.

elegantmoose avatar elegantmoose commented on June 3, 2024

Are you setting the cookie in the API request?

I only get 500s if I dont set the cookie.

Screenshot from 2024-02-20 23-14-47

from caldera.

3isenHeiM avatar 3isenHeiM commented on June 3, 2024

I've pulled the latest commit on the master (08c64d3), checked out the master branch and built with docker-compose build, but I still have the same error:

caldera_1  | 2024-03-13 08:52:02 INFO     Docs built successfully.                 hook.py:58
caldera_1  | Traceback (most recent call last):
caldera_1  |   File "/opt/venv/caldera/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 561, in __init__
caldera_1  |     raise ValueError("Not a directory")
caldera_1  | ValueError: Not a directory
caldera_1  | 
caldera_1  | The above exception was the direct cause of the following exception:
caldera_1  | 
caldera_1  | Traceback (most recent call last):
caldera_1  |   File "/usr/src/app/server.py", line 281, in <module>
caldera_1  |     run_tasks(services=app_svc.get_services(), run_vue_server=args.uiDevHost)
caldera_1  |   File "/usr/src/app/server.py", line 89, in run_tasks
caldera_1  |     loop.run_until_complete(RestApi(services).enable())
caldera_1  |   File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
caldera_1  |     return future.result()
caldera_1  |            ^^^^^^^^^^^^^^^
caldera_1  |   File "/usr/src/app/app/api/rest_api.py", line 32, in enable
caldera_1  |     self.app_svc.application.router.add_static('/assets', 'plugins/magma/dist/assets/', append_version=True)
caldera_1  |   File "/opt/venv/caldera/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 1136, in add_static
caldera_1  |     resource = StaticResource(
caldera_1  |                ^^^^^^^^^^^^^^^
caldera_1  |   File "/opt/venv/caldera/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 563, in __init__
caldera_1  |     raise ValueError(f"No directory exists at '{directory}'") from error
caldera_1  | ValueError: No directory exists at '/usr/src/app/plugins/magma/dist/assets'

from caldera.

digoblin avatar digoblin commented on June 3, 2024

I've pulled the latest commit on the master (08c64d3), checked out the master branch and built with docker-compose build, but I still have the same error:

caldera_1  | 2024-03-13 08:52:02 INFO     Docs built successfully.                 hook.py:58
caldera_1  | Traceback (most recent call last):
caldera_1  |   File "/opt/venv/caldera/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 561, in __init__
caldera_1  |     raise ValueError("Not a directory")
caldera_1  | ValueError: Not a directory
caldera_1  | 
caldera_1  | The above exception was the direct cause of the following exception:
caldera_1  | 
caldera_1  | Traceback (most recent call last):
caldera_1  |   File "/usr/src/app/server.py", line 281, in <module>
caldera_1  |     run_tasks(services=app_svc.get_services(), run_vue_server=args.uiDevHost)
caldera_1  |   File "/usr/src/app/server.py", line 89, in run_tasks
caldera_1  |     loop.run_until_complete(RestApi(services).enable())
caldera_1  |   File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
caldera_1  |     return future.result()
caldera_1  |            ^^^^^^^^^^^^^^^
caldera_1  |   File "/usr/src/app/app/api/rest_api.py", line 32, in enable
caldera_1  |     self.app_svc.application.router.add_static('/assets', 'plugins/magma/dist/assets/', append_version=True)
caldera_1  |   File "/opt/venv/caldera/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 1136, in add_static
caldera_1  |     resource = StaticResource(
caldera_1  |                ^^^^^^^^^^^^^^^
caldera_1  |   File "/opt/venv/caldera/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py", line 563, in __init__
caldera_1  |     raise ValueError(f"No directory exists at '{directory}'") from error
caldera_1  | ValueError: No directory exists at '/usr/src/app/plugins/magma/dist/assets'

Hi there, I was having the same problem starting the docker-compose file and I identified the problem with the volume mount referenced in the docker-compose file, I created a workaround for those that want to use the caldera's git folder as the containers /usr/src/app folder:

The problem I identified is that the docker-compose file, uses the current dir, supposedly the caldera's git folder, as its app folder:

volumes:
      - ./:/usr/src/app

Now the problem with the latest build of the Docker file (f9b0ed2) is that it is using the /usr/src/app folder to install the magma plugin and when a new container is started with the volume mounted like in the docker-compose file, the contents of the plugins/magma/ folder get overridden with the default files of caldera's git folder.

My workaround was to create a ubuntu container with the caldera's github folder mounted inside it, run the instructions of the Dockerfile pertaining the magma plugin installation and thus achieve a permanent plugin installation.

First we create the fix file in the caldera's git folder, fix.sh:

#!/bin/sh
cd /app && \
apt-get update && \
apt-get install -y nodejs npm && \
# Directly use npm to install dependencies and build the application
(cd plugins/magma && npm install) && \
(cd plugins/magma && npm run build) && \
# Remove Node.js, npm, and other unnecessary packages
apt-get remove -y nodejs npm && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

now save it and then give it execution permissions:

chmod +x fix.sh

now we create a temporary ubuntu docker container with the caldera folder mounted inside in /app path, and execute the fix.sh script:

docker run --rm -v $PWD:/app ubuntu:23.04 ./app/fix.sh
#    --rm - remove the container once it is done
#   -v mount the current directory ($PWD) in /app inside the container

now the files in plugins/magma/dist folder should be present and we can start the docker-compose project:

docker-compose up

A big thank you to the people developing this great project!

Update: included the "cd /app" line to the fix

from caldera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.