How to deploy a front-end project to a server?

I"m working on a front-end editor where users can generate a project.zip after editing a web page.
if you are local, just extract project.zip and use vscode to open the project, yarn start and then visit localhost:8000.

now you want to automate the deployment and preview the web page,

what toolkit is needed for manual deployment, what commands are typed in docker, and then you can see the web page by visiting the server address?

Update: the front end told me that the entire project cannot be uploaded. The node_module is too big. Do you still need to study packaging with webpack?

Mar.05,2021

Thank you. The final solution is to write a web page preview module at the front end. Because the user can see the project when editing at the front end, the web page preview module is similar to this editing module. Do not need to compile, save server space.


Pure front-end projects use nginx if it is the same docker with docker nginx to specify the path, take a look at the document.


write a shell script to achieve.
the ssh public key of the local machine (~ / .ssh/id_rsa.pub) is configured to the corresponding server (~ / .ssh/authorized_keys)
and then the sh command is executed locally to OK.



jenkins

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eac43d-20c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eac43d-20c2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?