Merge frontend & backend into single repo #44

Closed
opened 2021-04-28 21:23:55 +02:00 by Jef Roosens · 1 comment

I've given this lots of thought and I do believe that this is the best way to move forward.

  • We can more easily package both the frontend & the backend into a single container, if we so choose
    • We could make a full & a slim version
    • Rocket could serve the frontend as well
    • Enabling the frontend could be done using a feature (and perhaps by compiling the site build inside the binary)
  • fejctl can be updated to also handle setting up the frontend
  • Locally developing the frontend will be easier because we can then auto-start the backend when needed

I've taken inspiration from the Gitea repository, where the frontend is also contained inside the same repo.

This method does however pose some challenges that will have to be addressed:

  • Can Rocket cache the results or must this be handled by a reverse proxy?
  • We gotta make sure renovatebot doesn't shit the bed

Things to do

  • Move frontend source code into repo
  • Rename repo to just "fej"
  • Update fejctl to allow development of frontend
  • Package frontend into release container
  • Update Rocket server to serve static files on /
I've given this lots of thought and I do believe that this is the best way to move forward. * We can more easily package both the frontend & the backend into a single container, if we so choose * We could make a full & a slim version * Rocket could serve the frontend as well * Enabling the frontend could be done using a feature (and perhaps by compiling the site build inside the binary) * `fejctl` can be updated to also handle setting up the frontend * Locally developing the frontend will be easier because we can then auto-start the backend when needed I've taken inspiration from the [Gitea repository](https://git.roosens.me/mirrors/gitea), where the frontend is also contained inside the same repo. This method does however pose some challenges that will have to be addressed: * Can Rocket cache the results or must this be handled by a reverse proxy? * We gotta make sure renovatebot doesn't shit the bed ## Things to do - [x] Move frontend source code into repo - [x] Rename repo to just "fej" - [x] Update `fejctl` to allow development of frontend - [x] Package frontend into release container - [x] Update Rocket server to serve static files on `/`
Jef Roosens added this to the Fej 1.1.0 - The Calm before the Storm milestone 2021-04-28 21:23:55 +02:00
Jef Roosens added the
enhancement
label 2021-04-28 21:23:55 +02:00
Jef Roosens self-assigned this 2021-04-28 21:23:55 +02:00
Jef Roosens added this to the Fej 1.1.0 project 2021-04-28 21:23:55 +02:00
Jef Roosens added a new dependency 2021-04-29 09:27:51 +02:00
Jef Roosens added the
project/frontend
label 2021-04-29 09:30:26 +02:00

Would it be possible to launch a Vite server inside Docker as well? That way, we could still fully migrate the development toolchain into Docker.

Would it be possible to launch a Vite server inside Docker as well? That way, we could still fully migrate the development toolchain into Docker.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Blocks
Reference: Chewing_Bever/fej#44
There is no content yet.