Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
node_modules
# Git files
.git
.gitignore
node_modules
.nuxt
.output
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.env
.env.*
!frontend/.env.example
.DS_Store
Thumbs.db
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
project_backup_*
100 changes: 17 additions & 83 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,90 +1,24 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
# Nuxt dev/build outputs
.output
.data
.nuxt

# Nuxt generate
.nitro
.cache
dist

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless

# IDE / Editor
.idea
# Node dependencies
node_modules

# Service worker
sw.*
# Logs
logs
*.log

# macOS
# Misc
.DS_Store
.fleet
.idea

# Vim swap files
*.swp
# Local env files
.env
.env.*
!.env.example
103 changes: 65 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,75 @@
# Nuxt Minimal Starter

# Deployer
> Deployer is a self-hosted, open-source, self-configuring tool for deploying your projects to the cloud. It is designed to be as easy to use as possible, and to make it easy to get started.
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.

## Build Setup
## 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
# install dependencies
$ npm install
# npm
npm run dev

# serve with hot reload at localhost:3000
$ npm run dev
# pnpm
pnpm dev

# build for production and launch server
$ npm run build
$ npm run start
# yarn
yarn dev

# generate static project
$ npm run generate
# bun
bun run dev
```

## Endpoints
API endpoints
### Authentication
| Path | Method | Description | Parameters |
|:-----------------|:----------------|:----------------------------------|:-----------------------|
| `/api` | GET |The API root | None |
| `/api/regsiter` | POST |Create a new account | `name,email, password` |
| `/api/login` | POST |Authenticate a user | `email,password` |
| `/api/logout` | POST |End the session of the current user| none |
| `/api/user` | GET |Get the current authenticated user | none |

### Config routes
| Path | Method | Description | Parameters |
|:-------------------|:------------|:----------------------------------|:---------------------------|
| `/api/config` | GET | Get all the configs | none |
| `/api/config/{id}` | GET | Get a config by database ID | none |
| `/api/config` | POST | Create a config | `name,description,command` |
| `/api/config/{id}` | DELETE | Delete a config from the database | none |
| `/api/config/{id}` | PUT/PATH | Update a config in the database | `name,description,command` |

### Webhooks
| Path | Method | Description |
|:-------------|:-------|:-----------------------------|
| `/github` | POST | Github's webhook listener |
| `/bitbucket` | POST | Bitbucket's webhook listener |
| `/gitlab` | POST | Gitlab's webhook listener |
## 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.
6 changes: 6 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>
<NuxtRouteAnnouncer />
<NuxtWelcome />
</div>
</template>
File renamed without changes.
144 changes: 144 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
export default defineNuxtConfig({
// Server Side Rendering: https://nuxt.com/docs/getting-started/deployment#server-side-rendering
// ssr: true, // Default is true in Nuxt 3. Explicitly setting for clarity.

// TypeScript: https://nuxt.com/docs/guide/concepts/typescript
typescript: {
strict: true,
// typeCheck: true, // Can enable stricter type checking during build
},

// App metadata: https://nuxt.com/docs/api/configuration/nuxt-config#head
app: {
head: {
titleTemplate: '%s - Deployer',
title: 'Deployer',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
// 'hid' is Nuxt 2, use 'key' or just rely on 'name' for uniqueness in Nuxt 3
{ key: 'description', name: 'description', content: 'Nuxt 3 Deployer Application' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
},
},

// CSS: https://nuxt.com/docs/api/configuration/nuxt-config#css
css: [
'~/assets/variables.scss', // Copied from old project, for Vuetify
'~/assets/prism.css', // Copied from old project
],

// Modules: https://nuxt.com/modules
modules: [
'vuetify-nuxt-module',
'@sidebase/nuxt-auth',
'@vite-pwa/nuxt',
],

// Vuetify module configuration
vuetify: {
// vuetify-nuxt-module options. `styles` and `autoImport` are typically true by default or configured here.
// Check module documentation for exact options. Assuming autoImport is default or not needed explicitly here.
// `styles: 'sass'` might be needed if not default. The module aims to simplify this.
// For now, let's keep it minimal and rely on module defaults.
// moduleOptions: {
// styles: true, // This is often default or handled by providing `vuetifyOptions.scssSettings`
// },
vuetifyOptions: {
// Ensure this structure is correct for vuetify-nuxt-module
theme: {
themes: {
light: {
dark: false,
colors: {
primary: '#1ecbe1',
accent: '#607d8b',
secondary: '#E1341E',
info: '#00bcd4',
warning: '#ffc107',
error: '#f44336',
success: '#4caf50',
}
}
}
},
// icons: {
// defaultSet: 'mdi', // Ensure @mdi/font is installed
// },
}
},

// Nuxt Auth configuration: https://sidebase.io/nuxt-auth/configuration/nuxt-config
auth: {
provider: {
type: 'local',
endpoints: {
signIn: { path: '/auth/login', method: 'post' },
signOut: { path: '/auth/logout', method: 'post' },
signUp: { path: '/auth/register', method: 'post' },
getSession: { path: '/auth/user', method: 'get' }
},
pages: {
login: '/login',
},
token: {
signInResponseTokenPointer: '/token',
},
// IMPORTANT: Update this sessionDataType to match your actual user model/session structure
sessionDataType: { id: 'string', email: 'string', name: 'string', role: 'string', /* add other fields like picture, etc. */ }
},
// globalAppMiddleware: true, // Consider enabling this if auth is required for most pages
},

// PWA Configuration: https://vite-pwa-org.netlify.app/frameworks/nuxt.html#configuration
pwa: {
registerType: 'autoUpdate',
manifest: {
name: 'Deployer PWA',
short_name: 'Deployer',
description: 'Deployer Application with Nuxt 3',
theme_color: '#1ecbe1',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png',
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
},
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
},
devOptions: {
enabled: true,
type: 'module',
},
},

// Runtime Config: https://nuxt.com/docs/guide/going-further/runtime-config
runtimeConfig: {
// Example: authSecret: process.env.AUTH_SECRET, // For @sidebase/nuxt-auth if using advanced features or Auth.js type
public: {
// apiBase: '/api',
}
},

// Build configuration
build: {
// transpile: ['vuetify'], // vuetify-nuxt-module generally handles this.
},

// Dev server configuration
devServer: {
port: process.env.NUXT_PORT ? parseInt(process.env.NUXT_PORT) : 3005, // Renamed PORT to NUXT_PORT to avoid conflict
host: process.env.NUXT_HOST || '0.0.0.0', // Renamed HOST to NUXT_HOST
},

compatibilityDate: '2024-07-05',
});
Loading