mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-26 20:49:29 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9481beb61f | ||
|
|
141f2481a7 | ||
|
|
ea18f25adc | ||
|
|
9018184747 | ||
|
|
4fc2dd55f5 | ||
|
|
5ef9a282eb | ||
|
|
56b9a376bd | ||
|
|
0a1d31a188 | ||
|
|
64c9fb9a1b |
@@ -2,10 +2,8 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: 'bitnami/redis:6.2'
|
image: redis:6.2-alpine
|
||||||
container_name: coolify-redis
|
container_name: coolify-redis
|
||||||
environment:
|
|
||||||
- ALLOW_EMPTY_PASSWORD=yes
|
|
||||||
networks:
|
networks:
|
||||||
- coolify-infra
|
- coolify-infra
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -21,11 +21,9 @@ services:
|
|||||||
- coolify-infra
|
- coolify-infra
|
||||||
depends_on: ['redis']
|
depends_on: ['redis']
|
||||||
redis:
|
redis:
|
||||||
image: bitnami/redis:6.2
|
image: redis:6.2-alpine
|
||||||
restart: always
|
restart: always
|
||||||
container_name: coolify-redis
|
container_name: coolify-redis
|
||||||
environment:
|
|
||||||
- ALLOW_EMPTY_PASSWORD=yes
|
|
||||||
networks:
|
networks:
|
||||||
- coolify-infra
|
- coolify-infra
|
||||||
|
|
||||||
|
|||||||
@@ -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": "2.4.9",
|
"version": "2.4.10",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev",
|
"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev",
|
||||||
|
|||||||
@@ -62,10 +62,11 @@
|
|||||||
<div class="grid grid-cols-2 items-center px-10">
|
<div class="grid grid-cols-2 items-center px-10">
|
||||||
<label for="extraConfig">Extra Config</label>
|
<label for="extraConfig">Extra Config</label>
|
||||||
<textarea
|
<textarea
|
||||||
|
bind:value={service.wordpress.extraConfig}
|
||||||
disabled={isRunning}
|
disabled={isRunning}
|
||||||
readonly={isRunning}
|
readonly={isRunning}
|
||||||
class:resize-none={isRunning}
|
class:resize-none={isRunning}
|
||||||
rows={isRunning ? 1 : 5}
|
rows="5"
|
||||||
name="extraConfig"
|
name="extraConfig"
|
||||||
id="extraConfig"
|
id="extraConfig"
|
||||||
placeholder={!isRunning
|
placeholder={!isRunning
|
||||||
@@ -74,8 +75,8 @@
|
|||||||
define('WP_ALLOW_MULTISITE', true);
|
define('WP_ALLOW_MULTISITE', true);
|
||||||
define('MULTISITE', true);
|
define('MULTISITE', true);
|
||||||
define('SUBDOMAIN_INSTALL', false);`
|
define('SUBDOMAIN_INSTALL', false);`
|
||||||
: 'N/A'}>{service.wordpress.extraConfig}</textarea
|
: 'N/A'}
|
||||||
>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center px-10">
|
<div class="grid grid-cols-2 items-center px-10">
|
||||||
<Setting
|
<Setting
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export const post: RequestHandler = async (event) => {
|
|||||||
services: {
|
services: {
|
||||||
[`${id}-ftp`]: {
|
[`${id}-ftp`]: {
|
||||||
image: `atmoz/sftp:alpine`,
|
image: `atmoz/sftp:alpine`,
|
||||||
command: `'${ftpUser}:${password.replace('\n', '').replace(/\$/g, '$$$')}:e:1001'`,
|
command: `'${ftpUser}:${password.replace('\n', '').replace(/\$/g, '$$$')}:e:33'`,
|
||||||
extra_hosts: ['host.docker.internal:host-gateway'],
|
extra_hosts: ['host.docker.internal:host-gateway'],
|
||||||
container_name: `${id}-ftp`,
|
container_name: `${id}-ftp`,
|
||||||
volumes,
|
volumes,
|
||||||
|
|||||||
@@ -12,21 +12,44 @@ export const post: RequestHandler = async (event) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const service = await db.getService({ id, teamId });
|
const service = await db.getService({ id, teamId });
|
||||||
const { destinationDockerId, destinationDocker, fqdn } = service;
|
const {
|
||||||
|
destinationDockerId,
|
||||||
|
destinationDocker,
|
||||||
|
fqdn,
|
||||||
|
wordpress: { ftpEnabled }
|
||||||
|
} = service;
|
||||||
if (destinationDockerId) {
|
if (destinationDockerId) {
|
||||||
const engine = destinationDocker.engine;
|
const engine = destinationDocker.engine;
|
||||||
try {
|
try {
|
||||||
let found = await checkContainer(engine, id);
|
const found = await checkContainer(engine, id);
|
||||||
if (found) {
|
if (found) {
|
||||||
await removeDestinationDocker({ id, engine });
|
await removeDestinationDocker({ id, engine });
|
||||||
}
|
}
|
||||||
found = await checkContainer(engine, `${id}-mysql`);
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const found = await checkContainer(engine, `${id}-mysql`);
|
||||||
if (found) {
|
if (found) {
|
||||||
await removeDestinationDocker({ id: `${id}-mysql`, engine });
|
await removeDestinationDocker({ id: `${id}-mysql`, engine });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
if (ftpEnabled) {
|
||||||
|
const found = await checkContainer(engine, `${id}-ftp`);
|
||||||
|
if (found) {
|
||||||
|
await removeDestinationDocker({ id: `${id}-ftp`, engine });
|
||||||
|
}
|
||||||
|
await db.prisma.wordpress.update({
|
||||||
|
where: { serviceId: id },
|
||||||
|
data: { ftpEnabled: false }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user