mirror of
https://github.com/Dokploy/examples
synced 2025-06-26 18:15:52 +00:00
Merge pull request #6 from StefanVDWeide/docs/nuxt-examples
Docs: nuxt examples & Vuejs fix
This commit is contained in:
commit
51d817d6c6
@ -14,11 +14,11 @@ This repository contains examples of how to deploy applications using Dokploy.
|
||||
- [x] Svelte
|
||||
- [x] Vite
|
||||
- [x] VueJS
|
||||
- [x] Nuxt
|
||||
- [x] AstroJS
|
||||
- [x] Astro SSR
|
||||
- [x] Go Fiber
|
||||
- [x] NestJS
|
||||
- [x] T3 App
|
||||
|
||||
|
||||
---
|
||||
|
24
nuxt/.gitignore
vendored
Normal file
24
nuxt/.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
61
nuxt/README.md
Normal file
61
nuxt/README.md
Normal file
@ -0,0 +1,61 @@
|
||||
# Nuxt Example
|
||||
|
||||
This repository contains an example of a Nuxt application that is deployed on Dokploy. There are two ways to deploy this application:
|
||||
|
||||
- With server side rendering
|
||||
- As a static site
|
||||
|
||||
All examples assume you use `Nixpacks` as the build type.
|
||||
|
||||
## Server side rendering
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/nuxt`
|
||||
|
||||
2. **Add Environment Variables**:
|
||||
|
||||
- Navigate to the "Environments" tab and add the following variable:
|
||||
|
||||
```plaintext
|
||||
NIXPACKS_START_CMD="node .output/server/index.mjs"
|
||||
```
|
||||
|
||||
3. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
4. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
|
||||
## Static site
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/nuxt`
|
||||
|
||||
2. **Add Environment Variables**:
|
||||
|
||||
- Navigate to the "Environments" tab and add the following variable:
|
||||
|
||||
```plaintext
|
||||
NIXPACKS_BUILD_CMD="pnpm generate"
|
||||
```
|
||||
|
||||
3. **Set the publish directory**:
|
||||
|
||||
- Ensure you set it to `dist/`. Note that there is no dot before `dist`!
|
||||
|
||||
4. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
|
||||
5. **Generate a Domain**:
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
- Set the port to 80
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
6
nuxt/app.vue
Normal file
6
nuxt/app.vue
Normal file
@ -0,0 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<NuxtRouteAnnouncer />
|
||||
<NuxtWelcome />
|
||||
</div>
|
||||
</template>
|
5
nuxt/nuxt.config.ts
Normal file
5
nuxt/nuxt.config.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2024-04-03',
|
||||
devtools: { enabled: true }
|
||||
})
|
17
nuxt/package.json
Normal file
17
nuxt/package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"nuxt": "^3.14.159",
|
||||
"vue": "latest",
|
||||
"vue-router": "latest"
|
||||
}
|
||||
}
|
6384
nuxt/pnpm-lock.yaml
Normal file
6384
nuxt/pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
nuxt/public/favicon.ico
Normal file
BIN
nuxt/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
1
nuxt/public/robots.txt
Normal file
1
nuxt/public/robots.txt
Normal file
@ -0,0 +1 @@
|
||||
|
3
nuxt/server/tsconfig.json
Normal file
3
nuxt/server/tsconfig.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
4
nuxt/tsconfig.json
Normal file
4
nuxt/tsconfig.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
@ -2,17 +2,16 @@
|
||||
|
||||
This repository contains an example of vuejs application that is deployed on Dokploy.
|
||||
|
||||
This example assume you use `Nixpacks` as the build type.
|
||||
|
||||
1. **Use Git Provider in Your Application**:
|
||||
- Repository: `https://github.com/Dokploy/examples.git`
|
||||
- Branch: `main`
|
||||
- Build path: `/vuejs`
|
||||
|
||||
2. **Add Environment Variables**:
|
||||
- Navigate to the "Environments" tab and add the following variable:
|
||||
```plaintext
|
||||
NIXPACKS_START_CMD="pnpm run preview"
|
||||
```
|
||||
2. **Set the publish publish directory**:
|
||||
|
||||
- Ensure you set it to `dist/`. Note that there is no dot before `dist`!
|
||||
|
||||
3. **Click on Deploy**:
|
||||
- Deploy your application by clicking the deploy button.
|
||||
@ -21,6 +20,6 @@ This repository contains an example of vuejs application that is deployed on Dok
|
||||
- Click on generate domain button.
|
||||
- A new domain will be generated for you.
|
||||
- You can use this domain to access your application.
|
||||
- Set the port to 80
|
||||
|
||||
|
||||
If you need further assistance, join our [Discord server](https://discord.com/invite/2tBnJ3jDJc).
|
||||
|
Loading…
Reference in New Issue
Block a user