Docker Addon
The Docker addon adds containerized deployment support to your project.
What it includes
Dockerfile— multi-stage build for Phoenix + SvelteKitdocker-compose.yml— local development with PostgreSQL.dockerignore— optimized build context- Makefile targets for Docker operations
Local development with Docker
Start the full stack with Docker Compose:
docker compose up This starts:
- PostgreSQL on port 5432
- Phoenix on port 4000
- SvelteKit dev server on port 5173
Production build
Build the production image:
docker build -t my-app . The multi-stage Dockerfile:
- Installs Elixir and Node.js dependencies
- Builds the SvelteKit client to static assets
- Compiles the Phoenix release
- Creates a minimal runtime image
Disabling the addon
If you’re deploying without containers:
npx tostada-cli create MyApp -docker This removes the Dockerfile, docker-compose.yml, .dockerignore, and related Makefile targets.