mirror of
https://github.com/coollabsio/coolify-examples.git
synced 2026-02-19 05:48:58 +00:00
new examples
This commit is contained in:
32
node/nuxtjs/static/.coolpack/Dockerfile
Normal file
32
node/nuxtjs/static/.coolpack/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# Generated by Coolpack
|
||||
# Provider: node, Framework: nuxt, Output: static
|
||||
|
||||
FROM node:24-slim AS builder
|
||||
WORKDIR /app
|
||||
|
||||
ARG TEST_ENV_VAR
|
||||
ENV TEST_ENV_VAR=$TEST_ENV_VAR
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM caddy:alpine AS runner
|
||||
|
||||
RUN addgroup --system --gid 1001 coolgroup && \
|
||||
adduser --system --uid 1001 -G coolgroup cooluser
|
||||
|
||||
COPY --from=builder /app/.output/public /srv
|
||||
|
||||
RUN chown -R cooluser:coolgroup /srv
|
||||
|
||||
USER cooluser
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["caddy", "file-server", "--root", "/srv", "--listen", ":80"]
|
||||
11
node/nuxtjs/static/.dockerignore
Normal file
11
node/nuxtjs/static/.dockerignore
Normal file
@@ -0,0 +1,11 @@
|
||||
node_modules/
|
||||
.git/
|
||||
.gitignore
|
||||
.env
|
||||
.env.local
|
||||
*.md
|
||||
.DS_Store
|
||||
*.log
|
||||
npm-debug.log*
|
||||
.nuxt/
|
||||
.output/
|
||||
24
node/nuxtjs/static/.gitignore
vendored
Normal file
24
node/nuxtjs/static/.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
|
||||
75
node/nuxtjs/static/README.md
Normal file
75
node/nuxtjs/static/README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# Nuxt Minimal Starter
|
||||
|
||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||
18
node/nuxtjs/static/app/app.vue
Normal file
18
node/nuxtjs/static/app/app.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
const config = useRuntimeConfig();
|
||||
|
||||
onMounted(() => {
|
||||
console.log('TEST_ENV_VAR:', config.public.testEnvVar);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NuxtRouteAnnouncer />
|
||||
<div style="padding: 20px; background: #f0f0f0; margin: 20px; border-radius: 8px;">
|
||||
<h2>Environment Variable Test</h2>
|
||||
<p><strong>TEST_ENV_VAR:</strong> {{ config.public.testEnvVar }}</p>
|
||||
</div>
|
||||
<NuxtWelcome />
|
||||
</div>
|
||||
</template>
|
||||
11
node/nuxtjs/static/nuxt.config.ts
Normal file
11
node/nuxtjs/static/nuxt.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-07-15',
|
||||
devtools: { enabled: true },
|
||||
ssr: false,
|
||||
runtimeConfig: {
|
||||
public: {
|
||||
testEnvVar: process.env.TEST_ENV_VAR || 'default-value',
|
||||
},
|
||||
},
|
||||
})
|
||||
9509
node/nuxtjs/static/package-lock.json
generated
Normal file
9509
node/nuxtjs/static/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
node/nuxtjs/static/package.json
Normal file
17
node/nuxtjs/static/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "static",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "nuxt generate",
|
||||
"dev": "nuxt dev",
|
||||
"start": "npx serve@latest .output/public",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"nuxt": "^4.2.1",
|
||||
"vue": "^3.5.25",
|
||||
"vue-router": "^4.6.3"
|
||||
}
|
||||
}
|
||||
BIN
node/nuxtjs/static/public/favicon.ico
Normal file
BIN
node/nuxtjs/static/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
2
node/nuxtjs/static/public/robots.txt
Normal file
2
node/nuxtjs/static/public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
User-Agent: *
|
||||
Disallow:
|
||||
18
node/nuxtjs/static/tsconfig.json
Normal file
18
node/nuxtjs/static/tsconfig.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.server.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.shared.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.node.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user