Skip to content

tair/mb4-web

Repository files navigation

mb4-web

This template should help get you started developing with Vue 3 in Vite.

Configure Local Environment File for Development

cp development.env.template .env

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Hot-Reload for Development on Local with Shared Network Container

Before launching the application, make sure you've created a shared network as instructed in mb4-proxy project The container is accessible on http://localhost:81/ and http://localhost:3000/

Start the container

docker-compose -f docker-compose.local.yml up

Rebuild when .env file gets updated

docker-compose -f docker-compose.local.yml up --build

Force rebuild when package.json or package-lock.json file gets updated

docker stop mb4-web-container-dev
docker rm mb4-web-container-dev
docker-compose -f docker-compose.local.yml build --no-cache
docker-compose -f docker-compose.local.yml up

Compile and Hot-Reload for Development With Container

The container is accessible on http://localhost:3000/

Start the container

docker-compose -f docker-compose.dev.yml up

Rebuild when .env file gets updated

docker-compose -f docker-compose.dev.yml up --build

Force rebuild when package.json or package-lock.json file gets updated

docker stop mb4-web-container-dev
docker rm mb4-web-container-dev
docker-compose -f docker-compose.dev.yml build --no-cache
docker-compose -f docker-compose.dev.yml up

Compile and Minify for Production

npm run build

Compile and Minify for Production With Container - Build Only

docker build -t mb4-web:<version_number> .

Compile and Minify for Production With Container - Host As a Server

The container is accessible on http://localhost:4000/

When there is NO package.json or package-lock.json file change

docker-compose up --build

When there is package.json or package-lock.json file change

docker stop mb4-web-container
docker rm mb4-web-container
docker-compose build --no-cache
docker-compose up