Skip to content

brunopistone/nginx-vue-docker

Repository files navigation

Vue.js / Webpack / Docker / NginX

contributions welcome HitCount

Overview

This repository contains everythings you need to create and run a docker container for a vue webapplication


Vue.js is used as main Frontend framework, project was bootstraped using `vue-cli` and using Vue.js version `2.5.2`

3.6.0
We use Webpack to bundle and build everything into static html file that is ready to be served via Docker


We use docker to package static html, js and css files and serve them via Nginx inside of docker. For best performance we use lightweight Alpine linux


Nginx will serve static content from within a docker

Requirements

You should have following sowftare installed on your machine:

  • Node
  • Npm
  • Docker

frontend creation

  • npm install -g vue-cli
  • vue init webpack frontend
  • cd frontend/
  • npm install node-sass sass-loader --save
  • npm install

Docker build for production

in:

  • frontend/
    • create server.js file like the example
    • in package.json
      • edit "start" script to "start": "node server.js",

Go to the project root and run this command

Local, non-docker watcher and builds

# install dependencies
- npm install

# serve with hot reload at localhost:8080
- npm run dev

# build for production with minification
- npm run build

# build for production and view the bundle analyzer report
- npm run build --report

About

My website realized with vuejs framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published