Skip to content

Commit baab3ad

Browse files
Fix issue unable to restart jobs
1 parent fa41836 commit baab3ad

6 files changed

Lines changed: 26 additions & 25 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The app can be started using the following `compose.yml`:
3838
services:
3939
containers-up:
4040
# https://github.com/DigitallyRefined/containers-up/releases
41-
image: ghcr.io/digitallyrefined/containers-up:1.3.6
41+
image: ghcr.io/digitallyrefined/containers-up:1.3.7
4242
restart: unless-stopped
4343
ports:
4444
- 3000:3000
@@ -62,7 +62,7 @@ Optional system wide configuration can be changed by copying `.env.default` to `
6262
services:
6363
containers-up:
6464
# https://github.com/DigitallyRefined/containers-up/releases
65-
image: ghcr.io/digitallyrefined/containers-up:1.3.6
65+
image: ghcr.io/digitallyrefined/containers-up:1.3.7
6666
restart: unless-stopped
6767
volumes:
6868
- ./containers-up/storage:/storage

bun.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
containers-up:
33
# https://github.com/DigitallyRefined/containers-up/releases
4-
image: ghcr.io/digitallyrefined/containers-up:1.3.6
4+
image: ghcr.io/digitallyrefined/containers-up:1.3.7
55
container_name: containers-up
66
restart: unless-stopped
77
volumes:

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "containers-up",
3-
"version": "1.3.6",
3+
"version": "1.3.7",
44
"description": "Containers Up! a web based platform designed to manage and update containers",
55
"author": "DigitallyRefined",
66
"license": "ISC",
@@ -30,19 +30,19 @@
3030
"@radix-ui/react-slot": "^1.2.4",
3131
"@radix-ui/react-toast": "^1.2.15",
3232
"@radix-ui/react-tooltip": "^1.2.8",
33-
"@tanstack/react-query": "^5.90.16",
33+
"@tanstack/react-query": "^5.90.18",
3434
"@tanstack/react-query-devtools": "^5.91.2",
3535
"bun-plugin-tailwind": "^0.1.2",
3636
"class-variance-authority": "^0.7.1",
3737
"clsx": "^2.1.1",
3838
"jose": "^6.1.3",
3939
"lucide-react": "^0.562.0",
4040
"oidc-client-ts": "^3.4.1",
41-
"pino": "^10.1.1",
41+
"pino": "^10.2.0",
4242
"pino-pretty": "^13.1.3",
4343
"react": "^19.2.3",
4444
"react-dom": "^19.2.3",
45-
"react-hook-form": "^7.70.0",
45+
"react-hook-form": "^7.71.1",
4646
"tailwind-merge": "^3.4.0",
4747
"tailwindcss": "^4.1.18",
4848
"tailwindcss-animate": "^1.0.7",
@@ -51,7 +51,7 @@
5151
"devDependencies": {
5252
"@biomejs/biome": "2.3.11",
5353
"@tailwindcss/cli": "^4.1.18",
54-
"@types/bun": "^1.3.5",
54+
"@types/bun": "^1.3.6",
5555
"@types/pino": "^7.0.5",
5656
"@types/pino-pretty": "^5.0.0",
5757
"@types/react": "^19.2.8",

src/backend/endpoints/webhook/common.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ export const commonWebhookHandler = async (
3838
const event = `${eventName} ${hostConfig.name} ${folder || 'auto'}`;
3939
const logger = mainLogger.child({ event });
4040

41+
let containersCleanupLogs: any[] = [];
42+
let jobId: number;
43+
4144
const saveLogs = async () => {
4245
const logs = [getLogs(event), containersCleanupLogs].filter(Boolean).flat();
4346
return Promise.all(logs.map(async (log) => {
4447
await logDb.create({ jobId, hostId: hostConfig.id, ...log });
4548
}));
4649
};
4750

48-
if (!isBot) {
51+
if (!isBot && options.eventName !== 'manual-restart') {
4952
logger.info(
5053
`Received ${eventName}: Not processing request from non-bot user: action='${action}' merged='${merged}' title='${title}'`
5154
);
@@ -92,9 +95,6 @@ export const commonWebhookHandler = async (
9295
}
9396
}
9497

95-
let containersCleanupLogs: any[];
96-
let jobId: number;
97-
9898
if (action === 'opened') {
9999
jobId = await jobDb.upsert({ ...jobData, status: JobStatus.open });
100100

src/backend/endpoints/webhook/pull-restart.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const pullRestartUpdatedContainers = async (
2323
const dockerExec = createDockerExec(logger);
2424

2525
const composePullDownUp = async (composeFolder: string) => {
26-
logger.info(`Restarting services for compose file: ${composeFolder}`);
26+
logger.info(`Restarting services in: ${composeFolder}`);
2727
const response = dockerExec.restartCompose(name, host, composeFolder, true);
2828
await response.text();
2929
};
@@ -59,8 +59,9 @@ export const pullRestartUpdatedContainers = async (
5959
const changedFiles = changedFilesStdout.split('\n').filter(Boolean);
6060
if (changedFiles.some((f: string) => isComposeFilename(f))) {
6161
for (const changedFile of changedFiles) {
62-
if (isComposeFilename(changedFile) && !folderExcluded(changedFile, excludeFolders)) {
63-
await composePullDownUp(changedFile);
62+
const composeFolder = path.dirname(path.join(workingFolder, changedFile));
63+
if (!folderExcluded(composeFolder, excludeFolders)) {
64+
await composePullDownUp(composeFolder);
6465
}
6566
}
6667
} else {

0 commit comments

Comments
 (0)