Nuxi-Docker is a preconfigured Docker development environment for Nuxt.js projects, with a drop-in replacement for the Nuxi CLI.
Inspired by Laravel Sail and Vessel.
Create a new Nuxt.js project:
npx nuxi-docker init my-project
Bring up the Docker environment:
npx nuxi-docker up -d
Use nuxi-docker
as a drop-in replacement for nuxi
:
npx nuxi-docker dev
To create a new Nuxt.js project and set it up within the Nuxi-Docker environment:
npx nuxi-docker init <PROJECT>
This command automates project creation by executing nuxi init <PROJECT>
and copying the necessary Docker configurations for the new project.
If you already have an existing Nuxt.js project and want to integrate it with the Nuxi-Docker environment, you can use the install
command:
npx nuxi-docker install
This command sets up the necessary configurations and Docker environment within your current Nuxt project.
To start the Docker environment:
npx nuxi-docker up -d
The following commands are proxied directly to Nuxi in the app container:
add
analyze
build-module
cleanup
dev
devtools
generate
info
init
prepare
preview
typecheck
upgrade
To use these commands, execute:
npx nuxi-docker <COMMAND> [args]
To avoid collision with Docker Compose's build
, use nuxi-build
to run Nuxi's build in the app container:
npx nuxi-docker nuxi-build [args]
The commands nuxi
, nuxt
, node
, npm
, npx
, yarn
, pnpm
, pnpx
, bun
, and bunx
are proxied to the binaries in the app container. Use them by running:
npx nuxi-docker <COMMAND> [args]
Initiate a terminal in the app container using:
npx nuxi-docker shell
Commands prefixed with postgres
are forwarded to the Postgres container:
npx nuxi-docker postgres [args]
: Execute Postgres-related commands.npx nuxi-docker postgres shell
: Initiate a terminal in the Postgres container.npx nuxi-docker psql
: Open a Postgres CLI terminal in the Postgres container.
Any other command is proxied to Docker Compose.