diff --git a/package.json b/package.json index 41a593dcf..4cfc61406 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.4.9", + "version": "2.4.10", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev", diff --git a/src/routes/services/[id]/_Services/_Wordpress.svelte b/src/routes/services/[id]/_Services/_Wordpress.svelte index 3ea53edd3..ea754cb85 100644 --- a/src/routes/services/[id]/_Services/_Wordpress.svelte +++ b/src/routes/services/[id]/_Services/_Wordpress.svelte @@ -62,10 +62,11 @@
+ : 'N/A'} + />
{ services: { [`${id}-ftp`]: { 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'], container_name: `${id}-ftp`, volumes, diff --git a/src/routes/services/[id]/wordpress/stop.json.ts b/src/routes/services/[id]/wordpress/stop.json.ts index 2fc32b5a1..c99ed3420 100644 --- a/src/routes/services/[id]/wordpress/stop.json.ts +++ b/src/routes/services/[id]/wordpress/stop.json.ts @@ -12,21 +12,44 @@ export const post: RequestHandler = async (event) => { try { const service = await db.getService({ id, teamId }); - const { destinationDockerId, destinationDocker, fqdn } = service; + const { + destinationDockerId, + destinationDocker, + fqdn, + wordpress: { ftpEnabled } + } = service; if (destinationDockerId) { const engine = destinationDocker.engine; try { - let found = await checkContainer(engine, id); + const found = await checkContainer(engine, id); if (found) { 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) { await removeDestinationDocker({ id: `${id}-mysql`, engine }); } } catch (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 {