commit
61c3f57f4a
@ -33,6 +33,8 @@ RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-20.10.9 -o /usr/
|
|||||||
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.7.0 -o ~/.docker/cli-plugins/docker-compose
|
RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.7.0 -o ~/.docker/cli-plugins/docker-compose
|
||||||
RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker
|
RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker
|
||||||
|
|
||||||
|
RUN (curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-linux.tgz" | tar -C /usr/local/bin/ --no-same-owner -xzv pack)
|
||||||
|
|
||||||
COPY --from=build /app/apps/api/build/ .
|
COPY --from=build /app/apps/api/build/ .
|
||||||
COPY --from=build /app/apps/ui/build/ ./public
|
COPY --from=build /app/apps/ui/build/ ./public
|
||||||
COPY --from=build /app/apps/api/prisma/ ./prisma
|
COPY --from=build /app/apps/api/prisma/ ./prisma
|
||||||
|
9
apps/api/.env.example
Normal file
9
apps/api/.env.example
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
COOLIFY_APP_ID=
|
||||||
|
COOLIFY_SECRET_KEY="12341234123412341234123412341234 - 32 long"
|
||||||
|
COOLIFY_DATABASE_URL=
|
||||||
|
COOLIFY_SENTRY_DSN=
|
||||||
|
|
||||||
|
COOLIFY_IS_ON=docker
|
||||||
|
COOLIFY_WHITE_LABELED=false
|
||||||
|
COOLIFY_WHITE_LABELED_ICON=
|
||||||
|
COOLIFY_AUTO_UPDATE=
|
@ -52,16 +52,16 @@ const schema = {
|
|||||||
default: 'docker'
|
default: 'docker'
|
||||||
},
|
},
|
||||||
COOLIFY_WHITE_LABELED: {
|
COOLIFY_WHITE_LABELED: {
|
||||||
type: 'boolean',
|
type: 'string',
|
||||||
default: false
|
default: 'false'
|
||||||
},
|
},
|
||||||
COOLIFY_WHITE_LABELED_ICON: {
|
COOLIFY_WHITE_LABELED_ICON: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
COOLIFY_AUTO_UPDATE: {
|
COOLIFY_AUTO_UPDATE: {
|
||||||
type: 'boolean',
|
type: 'string',
|
||||||
default: false
|
default: 'false'
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -192,8 +192,8 @@ import * as buildpacks from '../lib/buildPacks';
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
// if (!imageFound || deployNeeded) {
|
if (!imageFound || deployNeeded) {
|
||||||
if (true) {
|
// if (true) {
|
||||||
await copyBaseConfigurationFiles(buildPack, workdir, buildId, applicationId, baseImage);
|
await copyBaseConfigurationFiles(buildPack, workdir, buildId, applicationId, baseImage);
|
||||||
if (buildpacks[buildPack])
|
if (buildpacks[buildPack])
|
||||||
await buildpacks[buildPack]({
|
await buildpacks[buildPack]({
|
||||||
@ -303,6 +303,7 @@ import * as buildpacks from '../lib/buildPacks';
|
|||||||
labels,
|
labels,
|
||||||
depends_on: [],
|
depends_on: [],
|
||||||
restart: 'always',
|
restart: 'always',
|
||||||
|
expose: [port],
|
||||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||||
// logging: {
|
// logging: {
|
||||||
// driver: 'fluentd',
|
// driver: 'fluentd',
|
||||||
|
29
apps/api/src/lib/buildPacks/heroku.ts
Normal file
29
apps/api/src/lib/buildPacks/heroku.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import { executeDockerCmd, prisma } from "../common"
|
||||||
|
import { saveBuildLog } from "./common";
|
||||||
|
|
||||||
|
export default async function (data: any): Promise<void> {
|
||||||
|
try {
|
||||||
|
const { buildId, applicationId, tag, dockerId, debug, workdir } = data
|
||||||
|
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
|
||||||
|
const { stdout } = await executeDockerCmd({
|
||||||
|
dockerId,
|
||||||
|
command: `pack build -p ${workdir} ${applicationId}:${tag} --builder heroku/buildpacks:20`
|
||||||
|
})
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
const array = stdout.split('\n')
|
||||||
|
for (const line of array) {
|
||||||
|
if (line !== '\n') {
|
||||||
|
await saveBuildLog({
|
||||||
|
line: `${line.replace('\n', '')}`,
|
||||||
|
buildId,
|
||||||
|
applicationId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await saveBuildLog({ line: `Building image successful.`, buildId, applicationId });
|
||||||
|
} catch (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,7 @@ import eleventy from './static';
|
|||||||
import python from './python';
|
import python from './python';
|
||||||
import deno from './deno';
|
import deno from './deno';
|
||||||
import laravel from './laravel';
|
import laravel from './laravel';
|
||||||
|
import heroku from './heroku';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
node,
|
node,
|
||||||
@ -33,5 +34,6 @@ export {
|
|||||||
eleventy,
|
eleventy,
|
||||||
python,
|
python,
|
||||||
deno,
|
deno,
|
||||||
laravel
|
laravel,
|
||||||
|
heroku
|
||||||
};
|
};
|
||||||
|
@ -17,7 +17,7 @@ import { checkContainer, removeContainer } from './docker';
|
|||||||
import { day } from './dayjs';
|
import { day } from './dayjs';
|
||||||
import * as serviceFields from './serviceFields'
|
import * as serviceFields from './serviceFields'
|
||||||
|
|
||||||
export const version = '3.2.0';
|
export const version = '3.2.1';
|
||||||
export const isDev = process.env.NODE_ENV === 'development';
|
export const isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
const algorithm = 'aes-256-ctr';
|
const algorithm = 'aes-256-ctr';
|
||||||
@ -1614,7 +1614,7 @@ export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await executeDockerCmd({ dockerId, command: `docker container prune -f` })
|
await executeDockerCmd({ dockerId, command: `docker container prune -f --filter "label=coolify.managed=true"` })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
//console.log(error);
|
//console.log(error);
|
||||||
}
|
}
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# create-svelte
|
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
|
||||||
|
|
||||||
## Creating a project
|
|
||||||
|
|
||||||
If you're seeing this, you've probably already done this step. Congrats!
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# create a new project in the current directory
|
|
||||||
npm init svelte
|
|
||||||
|
|
||||||
# create a new project in my-app
|
|
||||||
npm init svelte my-app
|
|
||||||
```
|
|
||||||
|
|
||||||
## Developing
|
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
|
|
||||||
# or start the server and open the app in a new browser tab
|
|
||||||
npm run dev -- --open
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
To create a production version of your app:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run build
|
|
||||||
```
|
|
||||||
|
|
||||||
You can preview the production build with `npm run preview`.
|
|
||||||
|
|
||||||
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
|
@ -24,7 +24,7 @@ export function getWebhookUrl(type: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CODESANDBOX_HOST) {
|
if (CODESANDBOX_HOST) {
|
||||||
const newURL = CODESANDBOX_HOST.replace(/\$PORT/,'3001')
|
const newURL = `https://${CODESANDBOX_HOST.replace(/\$PORT/,'3001')}`
|
||||||
if (type === 'github') {
|
if (type === 'github') {
|
||||||
return `${newURL}/webhooks/github/events`
|
return `${newURL}/webhooks/github/events`
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<section>
|
<section>
|
||||||
<article class="toast toast-bottom toast-end rounded-none" role="alert" transition:fade>
|
<article class="toast toast-bottom toast-end rounded-none" role="alert" transition:fade>
|
||||||
{#each $toasts as toast (toast.id)}
|
{#each $toasts as toast (toast.id)}
|
||||||
<Toast type={toast.type}>{toast.message}</Toast>
|
<Toast type={toast.type}>{@html toast.message}</Toast>
|
||||||
{/each}
|
{/each}
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
@ -293,6 +293,13 @@ export const buildPacks = [
|
|||||||
hoverColor: 'hover:bg-green-700',
|
hoverColor: 'hover:bg-green-700',
|
||||||
color: 'bg-green-700'
|
color: 'bg-green-700'
|
||||||
}
|
}
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'heroku',
|
||||||
|
// fancyName: 'Heroku Buildpack',
|
||||||
|
// hoverColor: 'hover:bg-indigo-700',
|
||||||
|
// color: 'bg-indigo-700'
|
||||||
|
// }
|
||||||
];
|
];
|
||||||
export const scanningTemplates = {
|
export const scanningTemplates = {
|
||||||
'@sveltejs/kit': {
|
'@sveltejs/kit': {
|
||||||
|
@ -106,10 +106,10 @@
|
|||||||
{#if currentStatus === 'queued'}
|
{#if currentStatus === 'queued'}
|
||||||
<div class="text-center font-bold text-xl">{$t('application.build.queued_waiting_exec')}</div>
|
<div class="text-center font-bold text-xl">{$t('application.build.queued_waiting_exec')}</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
<div class="flex justify-end sticky top-0 p-2 mx-1">
|
||||||
<button
|
<button
|
||||||
on:click={followBuild}
|
on:click={followBuild}
|
||||||
class="bg-transparent tooltip tooltip-primary tooltip-bottom hover:text-green-500 hover:bg-coolgray-500"
|
class="bg-transparent btn btn-sm tooltip tooltip-primary tooltip-bottom hover:text-green-500 hover:bg-coolgray-500"
|
||||||
data-tip="Follow logs"
|
data-tip="Follow logs"
|
||||||
class:text-green-500={followingBuild}
|
class:text-green-500={followingBuild}
|
||||||
>
|
>
|
||||||
@ -134,7 +134,7 @@
|
|||||||
<button
|
<button
|
||||||
on:click={cancelBuild}
|
on:click={cancelBuild}
|
||||||
class:animation-spin={cancelInprogress}
|
class:animation-spin={cancelInprogress}
|
||||||
class="bg-transparent hover:text-red-500 hover:bg-coolgray-500 tooltip tooltip-primary tooltip-bottom"
|
class="bg-transparent btn btn-sm btn-link hover:text-red-500 hover:bg-coolgray-500 tooltip tooltip-primary tooltip-bottom"
|
||||||
data-tip="Cancel build"
|
data-tip="Cancel build"
|
||||||
>
|
>
|
||||||
{#if cancelInprogress}
|
{#if cancelInprogress}
|
||||||
|
@ -147,7 +147,7 @@
|
|||||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
||||||
<button
|
<button
|
||||||
on:click={followBuild}
|
on:click={followBuild}
|
||||||
class="bg-transparent tooltip tooltip-primary tooltip-bottom"
|
class="bg-transparent btn btn-sm tooltip tooltip-primary tooltip-bottom"
|
||||||
data-tip="Follow logs"
|
data-tip="Follow logs"
|
||||||
class:text-green-500={followingLogs}
|
class:text-green-500={followingLogs}
|
||||||
>
|
>
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
||||||
<button
|
<button
|
||||||
on:click={followBuild}
|
on:click={followBuild}
|
||||||
class="bg-transparent tooltip tooltip-primary tooltip-bottom"
|
class="bg-transparent btn btn-sm tooltip tooltip-primary tooltip-bottom"
|
||||||
data-tip="Follow logs"
|
data-tip="Follow logs"
|
||||||
class:text-green-500={followingLogs}
|
class:text-green-500={followingLogs}
|
||||||
>
|
>
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
||||||
<button
|
<button
|
||||||
on:click={followBuild}
|
on:click={followBuild}
|
||||||
class="bg-transparent tooltip tooltip-primary tooltip-bottom"
|
class="bg-transparent btn btn-sm tooltip tooltip-primary tooltip-bottom"
|
||||||
data-tip="Follow logs"
|
data-tip="Follow logs"
|
||||||
class:text-green-500={followingLogs}
|
class:text-green-500={followingLogs}
|
||||||
>
|
>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "3.2.0",
|
"version": "3.2.1",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"repository": "github:coollabsio/coolify",
|
"repository": "github:coollabsio/coolify",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user