Skip to content

Instantly share code, notes, and snippets.

@kertnik05
Created January 26, 2022 07:31
Show Gist options
  • Select an option

  • Save kertnik05/30a1f4bdb38e215023925022460dda40 to your computer and use it in GitHub Desktop.

Select an option

Save kertnik05/30a1f4bdb38e215023925022460dda40 to your computer and use it in GitHub Desktop.
Dockerize FE (Vue)

spin ka lang muna ng container na may nodeJS pang build mo lang if gnun gusto mo ... pero meron kc ung iba kasama na ung dist sa build ng image pero gnito ung sa prod

docker run -w /usr/www -v path/to/app:/usr/www --name node-builder node:10-slim npm install && npm run build --> install and build (dist)

pag need mo ulit mag install and build docker start -i node-builder tapos kung gusto na serve docker run -d -p 8080:80 --name fe-webserver -v /path/to/dist:/usr/share/nginx/html:ro -d nginx localhost:8080 sa browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment