Merge pull request #572 from coollabsio/next

v3.8.5
This commit is contained in:
Andras Bacsai 2022-08-27 13:46:10 +02:00 committed by GitHub
commit fdce70937f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 16 deletions

View File

@ -671,11 +671,10 @@ export async function buildCacheImageWithNode(data, imageForBuild) {
if (isPnpm) {
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7');
}
Dockerfile.push(`COPY .${baseDirectory || ''} ./`);
if (installCommand) {
Dockerfile.push(`COPY .${baseDirectory || ''}/package.json ./`);
Dockerfile.push(`RUN ${installCommand}`);
}
Dockerfile.push(`COPY .${baseDirectory || ''} ./`);
Dockerfile.push(`RUN ${buildCommand}`);
await fs.writeFile(`${workdir}/Dockerfile-cache`, Dockerfile.join('\n'));
await buildImage({ ...data, isCache: true });

View File

@ -19,7 +19,7 @@ import * as serviceFields from './serviceFields'
import { saveBuildLog } from './buildPacks/common';
import { scheduler } from './scheduler';
export const version = '3.8.4';
export const version = '3.8.5';
export const isDev = process.env.NODE_ENV === 'development';
const algorithm = 'aes-256-ctr';

View File

@ -34,7 +34,7 @@ export async function getImages(request: FastifyRequest<GetImages>) {
const { buildPack, deploymentType } = request.body
let publishDirectory = undefined;
let port = undefined
const { baseImage, baseBuildImage, baseBuildImages, baseImages, } = setDefaultBaseImage(
const { baseImage, baseBuildImage, baseBuildImages, baseImages } = setDefaultBaseImage(
buildPack, deploymentType
);
if (buildPack === 'nextjs') {
@ -56,8 +56,7 @@ export async function getImages(request: FastifyRequest<GetImages>) {
}
}
return { baseBuildImage, baseBuildImages, publishDirectory, port }
return { baseImage, baseImages, baseBuildImage, baseBuildImages, publishDirectory, port }
} catch ({ status, message }) {
return errorHandler({ status, message })
}
@ -232,7 +231,6 @@ export async function saveApplication(request: FastifyRequest<SaveApplication>,
baseBuildImage,
deploymentType
} = request.body
if (port) port = Number(port);
if (exposePort) {
exposePort = Number(exposePort);

View File

@ -120,7 +120,13 @@
<nav class="nav-main">
<div class="flex h-screen w-full flex-col items-center transition-all duration-100">
{#if !$appSession.whiteLabeled}
<div class="my-4 h-10 w-10"><img src="/favicon.png" alt="coolLabs logo" /></div>
<div class="mb-2 mt-4 h-10 w-10">
<img src="/favicon.png" alt="coolLabs logo" />
</div>
{:else if $appSession.whiteLabeledDetails.icon}
<div class="mb-2 mt-4 h-10 w-10">
<img src={$appSession.whiteLabeledDetails.icon} alt="White labeled logo" />
</div>
{/if}
<div class="flex flex-col space-y-2 py-2" class:mt-2={$appSession.whiteLabeled}>
<a

View File

@ -114,10 +114,33 @@
buildPack: application.buildPack,
deploymentType: application.deploymentType
});
application = {
...application,
...data
};
const baseImageCorrect = data.baseImages.filter(
(image: any) => image.value === application.baseImage
);
if (baseImageCorrect.length === 0) {
application.baseImage = data.baseImage;
}
application.baseImages = data.baseImages;
const baseBuildImageCorrect = data.baseBuildImages.filter(
(image: any) => image.value === application.baseBuildImage
);
if (baseBuildImageCorrect.length === 0) {
application.baseBuildImage = data.baseBuildImage;
}
application.baseBuildImages = data.baseBuildImages;
if (application.deploymentType === 'static' && application.port !== '80') {
application.port = data.port;
}
if (application.deploymentType === 'node' && application.port === '80') {
application.port = data.port;
}
if (application.deploymentType === 'static' && !application.publishDirectory) {
application.publishDirectory = data.publishDirectory;
}
if (application.deploymentType === 'node' && application.publishDirectory === 'out') {
application.publishDirectory = data.publishDirectory;
}
}
async function changeSettings(name: any) {
if (name === 'debug') {
@ -631,9 +654,7 @@
bind:value={application.port}
placeholder="{$t('forms.default')}: 'python' ? '8000' : '3000'"
/>
<Explainer
text={'The port your application listens on.'}
/>
<Explainer text={'The port your application listens on.'} />
</div>
{/if}
<div class="grid grid-cols-2 items-center">

View File

@ -1,7 +1,7 @@
{
"name": "coolify",
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
"version": "3.8.4",
"version": "3.8.5",
"license": "Apache-2.0",
"repository": "github:coollabsio/coolify",
"scripts": {