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

Change where rooms frontend assets are served #56

Closed
chereseeriepa opened this issue Nov 22, 2022 · 4 comments · May be fixed by planetary-social/go-ssb-room#3
Closed

Change where rooms frontend assets are served #56

chereseeriepa opened this issue Nov 22, 2022 · 4 comments · May be fixed by planetary-social/go-ssb-room#3
Assignees

Comments

@chereseeriepa
Copy link
Contributor

chereseeriepa commented Nov 22, 2022

Need to change the location of where the frontend dist files are being served to make it easier for them to be replaced / overwritten by either manually (by someone) or automatic (through ansible)

The idea is that when someone creates a new production build of rooms-frontend (which each individual room will need to do in order to apply custom environment variables to the rooms-frontend), this change makes it a lot easier to overwrite the whole folder, rather than figuring out manually which ones need to be replaced/removed. This will then be a lot easier for the ansible script that will automate that process.

Proposed solution:

  • instead of serving them at go-ssb-room/web/assets they are served at go-ssb-room/web/assets/app or something similar
  • need to update the route that points to the assets, to point to this subfolder instead
@boreq
Copy link

boreq commented Dec 6, 2022

@chereseeriepa planetary-social/go-ssb-room@5e2a2da

I changed the way the assets are loaded. First we try to load
assets from web/app and if that fails we load them from web/assets. This
means that files can be in either one of those directories with web/app
taking priority.

So basically you should be able to move all your app files to web/app and keep them there. I moved 3 files for now as I wasn't sure which files belong to the frontend app and which are part of the rooms.

Let me know if this works for you.

@chereseeriepa
Copy link
Contributor Author

chereseeriepa commented Dec 6, 2022

Moved this back into this week as im unable to see the frontend in the dev room server

  • update dev room code to serve the assets the same way as the production server does
  • by default, it should show the old UI when there is no web/app (its currently showing a list of the assets on the landing page instead)

@boreq
Copy link

boreq commented Dec 7, 2022

Ok for now I fixed the dev server to also serve assets from web/app and then from web/assets if they are missing. This means that it should behave like the production server.

Do we also want to do the other requirement as part of this ticket ("by default, it should show the old UI when there is no web/app (its currently showing a list of the assets on the landing page instead") or is there a separate one for this?

@chereseeriepa
Copy link
Contributor Author

I just confirmed this is all working again and I will add

by default, it should show the old UI when there is no web/app (its currently showing a list of the assets on the landing page instead)

to separate card

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants