Help Center

VueJS

Vue.js is a progressive JavaScript framework for building user interfaces. Its learning curve is gentle and its reactivity system allows you to write declarative components with very little repeated code.

This Stack serves a Vue.js application without a database: it is the starting point for a frontend that consumes external APIs or that does not yet need its own persistence.

Services included

In addition to your application, the Stack brings up an nginx that receives traffic on port 80, an automatic backups service and the web file manager.

Project structure

text
.
β”œβ”€β”€ backup
β”‚   └── backup-runner.sh
β”œβ”€β”€ nginx
β”‚   └── default.conf
β”œβ”€β”€ vuejs
β”‚   β”œβ”€β”€ public
β”‚   β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”‚   β”œβ”€β”€ index.html
β”‚   β”‚   └── status.json
β”‚   β”œβ”€β”€ src
β”‚   β”‚   β”œβ”€β”€ ...
β”‚   β”‚   β”œβ”€β”€ App.vue
β”‚   β”‚   └── main.js
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ babel.config.js
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ package.json
β”‚   └── yarn.lock
β”œβ”€β”€ .env.example
└── compose.yaml

Getting started

Install the Stack and bring it up:

bash
docker-deploy-stack --stack javascript/vuejs
cd /root/stack/javascript/vuejs
docker compose up -d

Then replace the example application with yours, from Git, via SFTP or from the web file manager, following how-do-i-deploy-an-application-on-a-stack.md. Your code goes in the app/ folder.

Each time you update the code, apply the changes:

bash
docker compose up -d --build

Configuration

Editable values are in the Stack’s .env file:

Variable Default What it’s for
APP_PORT 80 Public port of the Stack.
APP_ENV development Application environment.
BACKUP_ENABLED 1 Automatic backups: 1 enabled, 0 disabled.
BACKUP_INTERVAL_SECONDS 86400 How many seconds between backups.
BACKUP_RETENTION_DAYS 7 How many days backups are retained.

After changing it, apply the changes with docker compose up -d.

Useful commands

bash
docker compose ps          # see the containers that are running
docker compose logs -f     # view logs live
docker compose restart     # restart the services
docker compose down        # stop and remove the containers
Guide g.0294 Β· Source version 1 Β· en