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 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/ui/build/ ./public
|
||||
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'
|
||||
},
|
||||
COOLIFY_WHITE_LABELED: {
|
||||
type: 'boolean',
|
||||
default: false
|
||||
type: 'string',
|
||||
default: 'false'
|
||||
},
|
||||
COOLIFY_WHITE_LABELED_ICON: {
|
||||
type: 'string',
|
||||
default: null
|
||||
},
|
||||
COOLIFY_AUTO_UPDATE: {
|
||||
type: 'boolean',
|
||||
default: false
|
||||
type: 'string',
|
||||
default: 'false'
|
||||
},
|
||||
|
||||
}
|
||||
|
@ -192,8 +192,8 @@ import * as buildpacks from '../lib/buildPacks';
|
||||
} catch (error) {
|
||||
//
|
||||
}
|
||||
// if (!imageFound || deployNeeded) {
|
||||
if (true) {
|
||||
if (!imageFound || deployNeeded) {
|
||||
// if (true) {
|
||||
await copyBaseConfigurationFiles(buildPack, workdir, buildId, applicationId, baseImage);
|
||||
if (buildpacks[buildPack])
|
||||
await buildpacks[buildPack]({
|
||||
@ -303,6 +303,7 @@ import * as buildpacks from '../lib/buildPacks';
|
||||
labels,
|
||||
depends_on: [],
|
||||
restart: 'always',
|
||||
expose: [port],
|
||||
...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),
|
||||
// logging: {
|
||||
// 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 deno from './deno';
|
||||
import laravel from './laravel';
|
||||
import heroku from './heroku';
|
||||
|
||||
export {
|
||||
node,
|
||||
@ -33,5 +34,6 @@ export {
|
||||
eleventy,
|
||||
python,
|
||||
deno,
|
||||
laravel
|
||||
laravel,
|
||||
heroku
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ import { checkContainer, removeContainer } from './docker';
|
||||
import { day } from './dayjs';
|
||||
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';
|
||||
|
||||
const algorithm = 'aes-256-ctr';
|
||||
@ -1614,7 +1614,7 @@ export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
await executeDockerCmd({ dockerId, command: `docker container prune -f` })
|
||||
await executeDockerCmd({ dockerId, command: `docker container prune -f --filter "label=coolify.managed=true"` })
|
||||
} catch (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) {
|
||||
const newURL = CODESANDBOX_HOST.replace(/\$PORT/,'3001')
|
||||
const newURL = `https://${CODESANDBOX_HOST.replace(/\$PORT/,'3001')}`
|
||||
if (type === 'github') {
|
||||
return `${newURL}/webhooks/github/events`
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
<section>
|
||||
<article class="toast toast-bottom toast-end rounded-none" role="alert" transition:fade>
|
||||
{#each $toasts as toast (toast.id)}
|
||||
<Toast type={toast.type}>{toast.message}</Toast>
|
||||
<Toast type={toast.type}>{@html toast.message}</Toast>
|
||||
{/each}
|
||||
</article>
|
||||
</section>
|
||||
|
@ -293,6 +293,13 @@ export const buildPacks = [
|
||||
hoverColor: 'hover:bg-green-700',
|
||||
color: 'bg-green-700'
|
||||
}
|
||||
// },
|
||||
// {
|
||||
// name: 'heroku',
|
||||
// fancyName: 'Heroku Buildpack',
|
||||
// hoverColor: 'hover:bg-indigo-700',
|
||||
// color: 'bg-indigo-700'
|
||||
// }
|
||||
];
|
||||
export const scanningTemplates = {
|
||||
'@sveltejs/kit': {
|
||||
|
@ -106,10 +106,10 @@
|
||||
{#if currentStatus === 'queued'}
|
||||
<div class="text-center font-bold text-xl">{$t('application.build.queued_waiting_exec')}</div>
|
||||
{: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
|
||||
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"
|
||||
class:text-green-500={followingBuild}
|
||||
>
|
||||
@ -134,7 +134,7 @@
|
||||
<button
|
||||
on:click={cancelBuild}
|
||||
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"
|
||||
>
|
||||
{#if cancelInprogress}
|
||||
|
@ -147,7 +147,7 @@
|
||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
||||
<button
|
||||
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"
|
||||
class:text-green-500={followingLogs}
|
||||
>
|
||||
|
@ -130,7 +130,7 @@
|
||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
||||
<button
|
||||
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"
|
||||
class:text-green-500={followingLogs}
|
||||
>
|
||||
|
@ -127,7 +127,7 @@
|
||||
<div class="flex justify-end sticky top-0 p-1 mx-1">
|
||||
<button
|
||||
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"
|
||||
class:text-green-500={followingLogs}
|
||||
>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "coolify",
|
||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.1",
|
||||
"license": "Apache-2.0",
|
||||
"repository": "github:coollabsio/coolify",
|
||||
"scripts": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user