fix: Enable https for Ghost

This commit is contained in:
Andras Bacsai 2022-04-09 13:25:46 +02:00
parent 5e7e1c11c7
commit a5f1b4b675
2 changed files with 4 additions and 1 deletions

View File

@ -165,7 +165,7 @@ export async function configureServiceType({ id, type }) {
}
});
} else if (type === 'ghost') {
const defaultEmail = `${cuid()}@coolify.io`;
const defaultEmail = `${cuid()}@example.com`;
const defaultPassword = encrypt(generatePassword());
const mariadbUser = cuid();
const mariadbPassword = encrypt(generatePassword());

View File

@ -44,12 +44,15 @@ export const post: RequestHandler = async (event) => {
const { workdir } = await createDirectories({ repository: type, buildId: id });
const image = getServiceImage(type);
const domain = getDomain(fqdn);
const isHttps = fqdn.startsWith('https://');
const config = {
ghost: {
image: `${image}:${version}`,
volume: `${id}-ghost:/bitnami/ghost`,
environmentVariables: {
url: fqdn,
GHOST_HOST: domain,
GHOST_ENABLE_HTTPS: isHttps ? 'yes' : 'no',
GHOST_EMAIL: defaultEmail,
GHOST_PASSWORD: defaultPassword,
GHOST_DATABASE_HOST: `${id}-mariadb`,