GithubHelp home page GithubHelp logo

Comments (12)

BuchholzTim avatar BuchholzTim commented on June 12, 2024 1

Thanks Guys for your Feedback!
I opened a PR which addresses this issue! I'll wait for @MarcBollmann to review my PR today or tomorrow, before merging it though.


@smilebasti
Your Question regarding the Eraser will also be addressed in the same PR in the README.md. Currently there is only Whole-Object Deletion by selecting an object and deleting it with the delete-key. An eraser was planned but not implemented yet due to time restrictions.

from whitebird.

BuchholzTim avatar BuchholzTim commented on June 12, 2024

We actually never tested to run the App behind a reverse proxy, but I can try to assist you with you problem.
Would you mind telling us a bit more about the specifics of your problem?

from whitebird.

smilebasti avatar smilebasti commented on June 12, 2024

I just did that, but it doesn't seem to work as the "Frontend/Website" is trying to connect to the Database.
It through's the Error that localhost:40001 can't be reached when i try to start a new Whiteboard.

from whitebird.

BuchholzTim avatar BuchholzTim commented on June 12, 2024

Did you change the used Environment Variables according to your needs as explained in https://github.com/BuchholzTim/Whitebird/wiki/Getting-Started ?

from whitebird.

smilebasti avatar smilebasti commented on June 12, 2024

Thanks for replying so fast.

I just checked again. I only have changed the User and Password in the Compose file and in the Backend file. In the Frontend file i changed frontend to a domain pointing to port 40000 in the reverse proxy. The other two i changed to a subdomain pointing to 40001.

The Error is now connection refused as i hand't the subdomain active in the first place

from whitebird.

BuchholzTim avatar BuchholzTim commented on June 12, 2024

Mh, I never encountered an issue of this kind.

  • Could you verify that your verify that all container are running without problems?
    • You can attach docker logs if you want
  • Can you verify that your backend is actually available under your provided domain?
    • In dev mode the backend will provide a testable swagger API under 'http://backenddomain/api'
    • In Production mode, the Swagger API is disabled by default, but accessing 'http://backenddomain/api' should still yield a response from NestJS in the form of {"statusCode":404,"message":"Cannot GET /api","error":"Not Found"}
  • Is your Frontend actually requesting from the correct domain?
    • In dev-mode the frontend will simply log all request
    • In prod mode you could verify this by checking the network tab of your browser

Without more info I cannot really help you out, but we never encountered an issue of this kind, even when running Frontend & Backend on two different domains.

from whitebird.

notnamed avatar notnamed commented on June 12, 2024

I'm having the same issue with Caddy as a reverse proxy. I also made the same changes; user/pass in compose and backend file, frontend to my domain (on the https scheme, without a port specified). It seems to be ignoring the FRONTEND_HOST I have configured, and is attempting a connection to http://localhost:40001 (where nothing is running, because it's installed on another machine).

  • Containers are all up and running without issues
  • API returns the statusCode JSON you suggested it should when hitting the endpoint via curl from inside frontend
  • The frontend container does have FRONTEND_HOST defined in the environment as I specified in the env file
  • All other assets are loading from the correct domain through Caddy

The logs don't look particularly interesting; I'm omitting the mongo logs because they're much chattier.

backend:

yarn run v1.22.5
$ node dist/main
[Nest] 27   - 02/20/2021, 2:08:39 PM   [NestFactory] Starting Nest application...
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] AppModule dependencies initialized +44ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] MongoProviderModule dependencies initialized +1ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] TypegooseModule dependencies initialized +0ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] ConfigModule dependencies initialized +0ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] ConfigModule dependencies initialized +1ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] TypegooseCoreModule dependencies initialized +43ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] TypegooseModule dependencies initialized +13ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] SocketModule dependencies initialized +1ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [InstanceLoader] WhiteboardModule dependencies initialized +0ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [SocketGateway] Initialized SocketGateway
[Nest] 27   - 02/20/2021, 2:08:39 PM   [RoutesResolver] WhiteboardController {/whiteboard}: +2ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [RouterExplorer] Mapped {/whiteboard/create, GET} route +2ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [RouterExplorer] Mapped {/whiteboard/:id, GET} route +0ms
[Nest] 27   - 02/20/2021, 2:08:39 PM   [NestApplication] Nest application successfully started +3ms

frontend

yarn run v1.22.5
$ nuxt start
ℹ Listening on: http://172.29.0.3:5000/
ℹ Serving static application from dist/

from whitebird.

smilebasti avatar smilebasti commented on June 12, 2024

I got the same logs as notnamed.

The api tells: {"statusCode":404,"message":"Cannot GET /","error":"Not Found"}

image

from whitebird.

mihha avatar mihha commented on June 12, 2024

Sorry guys for not replying sooner.

I would like just to confirm that I also have the same issues as @smilebasti and @notnamed reported

I can see backend API output but when I try to create a room, the application tries to access localhost:40001 and this is where it breaks

from whitebird.

BuchholzTim avatar BuchholzTim commented on June 12, 2024

So I reproduced the error.
The frontend.env is actually useless (as far as I see). We kinda forgot to remove/fix this as it made the impression to work.

The actual env-variables are set in the Dockerfile of the frontend.
This is done because nuxt needs the env-variables during build time, as they get statically set during build (this means, a change of variables can only be applied through a rebuild).

If I only use the frontend.env and remove the variables from the Dockerfile they aren't applied at all and nuxt defaults to its defaults.

So I'd ask you to change the variables in the Dockerfile according to your needs and just comment-out or remove frontend.env from the docker-compose.yml.

I will further test if my assumption here is correct in the coming/days weeks, as soon as I have enough time.

from whitebird.

smilebasti avatar smilebasti commented on June 12, 2024

I did all that and it works. Thanks.
Don't forget to enable websockets else it throughs an error in the Webconsole.

Just as a side question: is there an eraser? I can't seem to find it

from whitebird.

notnamed avatar notnamed commented on June 12, 2024

I got this working too, thanks! I had to create a separate vhost in Caddy for whiteboard-api.mydomain.com to proxy the port 40001 requests to the backend container, but with both vhosts for both ports, editing the variables in the frontend container's Dockerfile I'm up and running. I wasn't paying much attention to the port numbers, and had previously assumed that all traffic from the browser went through the frontend container, and the backend service was only there for frontend to talk to in the Docker network, but I see now that both services need to be exposed.

from whitebird.

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.