code4sac / trash-ai

Web based trash image classification

Home Page:https://www.trashai.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature]: Static JS bundle support

wincowgerDEV opened this issue · comments

Guidelines

  • I agree to follow this project's Contributing Guidelines.

Description

I just meant that it would be good to have a documentation on how to generate a static javascript bundle and upload it to a self-hosted webspace (e.g. locally for people wanting to use this model in an intranet or so).
Specifically, this means having something like

cd frontend
yarn build
cp dist

in the documentation. Regarding the disabled backend I've seen that it is possible to just use the frontend without any issues while testing this.
For gh pages it would just mean that you have an automatic gh action to generate a webpage which would then compile the js and copy it. You can simply use this action here https://github.com/marketplace/actions/github-pages-action and add your yarn build step. I think it should just work. The benefit would mainly be for development purposes, so people cloning the repo could immediately rollout the changes through this action.

Problem

Slow to deploy from docker and may not be necessary for all use cases.

Proposed Solution

cd frontend
yarn build
cp dist

Alternatives Considered

Expect Docker Deployment.

Minus the aws/github stuff can this be closed with #127 and #107 ?

I think we have made a lot of progress on this and will let the reviewers know we are where we would like to be for deployment ease.