Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: Astro buildpack

Andras Bacsai15a3fd445616
diff --git a/src/lib/buildPacks/index.ts b/src/lib/buildPacks/index.ts
index c8b133b5c2..4cdbacccef 100644
--- a/src/lib/buildPacks/index.ts
+++ b/src/lib/buildPacks/index.ts
@@ -10,6 +10,7 @@ import nuxtjs from './nuxtjs';
import vuejs from './vuejs';
import php from './php';
import rust from './rust';
+import astro from './static';
export {
node,
@@ -23,5 +24,6 @@ export {
nuxtjs,
vuejs,
php,
- rust
+ rust,
+ astro
};
diff --git a/src/lib/components/templates.ts b/src/lib/components/templates.ts
index bea5528123..56b72a250f 100644
--- a/src/lib/components/templates.ts
+++ b/src/lib/components/templates.ts
@@ -126,6 +126,16 @@ export function findBuildPack(pack, packageManager = 'npm') {
port: 3000
};
}
+ if (pack === 'astro') {
+ return {
+ ...metaData,
+ installCommand: `yarn install`,
+ buildCommand: `yarn build`,
+ startCommand: null,
+ publishDirectory: `dist`,
+ port: 80
+ };
+ }
return {
name: 'node',
fancyName: 'Node.js',
@@ -145,7 +155,6 @@ export const buildPacks = [
hoverColor: 'hover:bg-green-700',
color: 'bg-green-700'
},
-
{
name: 'static',
fancyName: 'Static',
@@ -158,6 +167,12 @@ export const buildPacks = [
hoverColor: 'hover:bg-sky-700',
color: 'bg-sky-700'
},
+ {
+ name: 'php',
+ fancyName: 'PHP',
+ hoverColor: 'hover:bg-indigo-700',
+ color: 'bg-indigo-700'
+ },
{
name: 'svelte',
fancyName: 'Svelte',
@@ -165,22 +180,22 @@ export const buildPacks = [
color: 'bg-orange-700'
},
{
- name: 'nestjs',
- fancyName: 'NestJS',
- hoverColor: 'hover:bg-red-700',
- color: 'bg-red-700'
+ name: 'vuejs',
+ fancyName: 'VueJS',
+ hoverColor: 'hover:bg-green-700',
+ color: 'bg-green-700'
},
{
- name: 'react',
- fancyName: 'React',
- hoverColor: 'hover:bg-blue-700',
- color: 'bg-blue-700'
+ name: 'nuxtjs',
+ fancyName: 'NuxtJS',
+ hoverColor: 'hover:bg-green-700',
+ color: 'bg-green-700'
},
{
- name: 'nextjs',
- fancyName: 'NextJS',
- hoverColor: 'hover:bg-blue-700',
- color: 'bg-blue-700'
+ name: 'astro',
+ fancyName: 'Astro',
+ hoverColor: 'hover:bg-pink-700',
+ color: 'bg-pink-700'
},
{
name: 'gatsby',
@@ -189,16 +204,10 @@ export const buildPacks = [
color: 'bg-blue-700'
},
{
- name: 'vuejs',
- fancyName: 'VueJS',
- hoverColor: 'hover:bg-green-700',
- color: 'bg-green-700'
- },
- {
- name: 'nuxtjs',
- fancyName: 'NuxtJS',
- hoverColor: 'hover:bg-green-700',
- color: 'bg-green-700'
+ name: 'react',
+ fancyName: 'React',
+ hoverColor: 'hover:bg-blue-700',
+ color: 'bg-blue-700'
},
{
name: 'preact',
@@ -207,10 +216,16 @@ export const buildPacks = [
color: 'bg-blue-700'
},
{
- name: 'php',
- fancyName: 'PHP',
- hoverColor: 'hover:bg-indigo-700',
- color: 'bg-indigo-700'
+ name: 'nestjs',
+ fancyName: 'NestJS',
+ hoverColor: 'hover:bg-red-700',
+ color: 'bg-red-700'
+ },
+ {
+ name: 'nextjs',
+ fancyName: 'NextJS',
+ hoverColor: 'hover:bg-blue-700',
+ color: 'bg-blue-700'
},
{
name: 'rust',
@@ -220,6 +235,9 @@ export const buildPacks = [
}
];
export const scanningTemplates = {
+ astro: {
+ buildPack: 'astro'
+ },
svelte: {
buildPack: 'svelte'
},
diff --git a/src/routes/applications/[id]/configuration/buildpack.svelte b/src/routes/applications/[id]/configuration/buildpack.svelte
index d2250be188..7bed31e066 100644
--- a/src/routes/applications/[id]/configuration/buildpack.svelte
+++ b/src/routes/applications/[id]/configuration/buildpack.svelte
@@ -35,6 +35,7 @@
import { get } from '$lib/api';
import { errorNotification } from '$lib/form';
import { gitTokens } from '$lib/store';
+ import { browser } from '$app/env';
let scanning = true;
let foundConfig = null;