Skip to content
Snippets Groups Projects
Select Git revision
  • dev
  • main default protected
2 results

web-admin

Nuxt Minimal Starter

Look at the Nuxt documentation to learn more.

Setup

Make sure to install dependencies:

npm install

Environment Variables

Create a .env file at the root of the project with the following variables:

# either latest or dev; used for docker-compose deployment (default is latest)
TAG=latest
# depends of your API configuration (default is 3d)
JWT_EXPIRES=3d
# depends of your API url (default is http://localhost:3001)
API_BASE_URL=http://localhost:3001
# generate a random string for the secret key (https://www.random.org/strings/)
SECRET_KEY=AZERTY

Development Server

Be sure there are no new dependency updates:

npx npm-check-updates -u
npx ncu @nuxt/ui --target @next
npm install

Start the development server on http://localhost:3000:

npm run dev

Production

Locally preview production build:

npm run build
npm run preview

With docker for a local build with the API:

# Start the API
docker pull gitlab-registry.imt-atlantique.fr/3spa/api:latest
docker run -d -p 3001:3000 --env-file .env --name 3spa-api gitlab-registry.imt-atlantique.fr/3spa/api:latest

# Start the app
docker build -t 3spa_web-admin .
docker run -d -p 3000:3000 --env-file .env --name 3spa_web-admin 3spa_web-admin

With docker-compose

docker-compose up -d

Check out the deployment documentation for more information.