Skip to content

Commit f014830

Browse files
Fix OIDC redirect with host query string
Tidy up error messages
1 parent bc9f000 commit f014830

12 files changed

Lines changed: 61 additions & 44 deletions

File tree

.env.default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GHCR_TOKEN="ghp_..."
2424
CONTAINER_REGISTRY_USERNAME=""
2525
CONTAINER_REGISTRY_TOKEN=""
2626

27-
# Optional OIDC authentication, App callback: https://containers-up.example.com/auth-callback*
27+
# Optional OIDC authentication, App callback: https://containers-up.example.com/auth-callback
2828
# ENV_PUBLIC_OIDC_ISSUER_URI="https://auth.example.com"
2929
# ENV_PUBLIC_OIDC_CLIENT_ID="..."
3030
# OIDC_CLIENT_SECRET="..."

README.md

Lines changed: 3 additions & 3 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.7
41+
image: ghcr.io/digitallyrefined/containers-up:1.3.8
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.7
65+
image: ghcr.io/digitallyrefined/containers-up:1.3.8
6666
restart: unless-stopped
6767
volumes:
6868
- ./containers-up/storage:/storage
@@ -129,7 +129,7 @@ networks:
129129
130130
2. Create the network `docker network create traefik` and start the services `docker compose up -d`
131131
3. Once Traefik and Pocket ID are up and running, set up a [new user via Pocket ID](https://pocket-id.org/docs/setup/installation) and optionally add them to an admin group
132-
4. In the Pocket ID admin account create a new OIDC client and set up the callback URL as `https://containers-up.example.com/auth-callback*` and optionally only allow the admin group
132+
4. In the Pocket ID admin account create a new OIDC client and set up the callback URL as `https://containers-up.example.com/auth-callback` and optionally only allow the admin group
133133
5. In the Containers Up! `.env` file (see `.env.default`) uncomment the OIDC config section, add the URI of Pocket ID (without any trailing paths) then copy and paste the client ID and secret (JWKS certificate URL can be set manually if auto-discovery fails via `OIDC_JWKS_URL`)
134134
6. After restarting the app, accessing `https://containers-up.example.com` should now require you to login
135135

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.12/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",

bun.lock

Lines changed: 21 additions & 21 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.7
4+
image: ghcr.io/digitallyrefined/containers-up:1.3.8
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.7",
3+
"version": "1.3.8",
44
"description": "Containers Up! a web based platform designed to manage and update containers",
55
"author": "DigitallyRefined",
66
"license": "ISC",
@@ -30,31 +30,31 @@
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.18",
33+
"@tanstack/react-query": "^5.90.20",
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.563.0",
4040
"oidc-client-ts": "^3.4.1",
41-
"pino": "^10.2.0",
41+
"pino": "^10.3.0",
4242
"pino-pretty": "^13.1.3",
4343
"react": "^19.2.3",
4444
"react-dom": "^19.2.3",
4545
"react-hook-form": "^7.71.1",
4646
"tailwind-merge": "^3.4.0",
4747
"tailwindcss": "^4.1.18",
4848
"tailwindcss-animate": "^1.0.7",
49-
"zod": "^4.3.5"
49+
"zod": "^4.3.6"
5050
},
5151
"devDependencies": {
5252
"@biomejs/biome": "2.3.12",
5353
"@tailwindcss/cli": "^4.1.18",
5454
"@types/bun": "^1.3.6",
5555
"@types/pino": "^7.0.5",
5656
"@types/pino-pretty": "^5.0.0",
57-
"@types/react": "^19.2.8",
57+
"@types/react": "^19.2.9",
5858
"@types/react-dom": "^19.2.3"
5959
}
6060
}

src/backend/endpoints/webhook/common.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ export const commonWebhookHandler = async (
4343

4444
const saveLogs = async () => {
4545
const logs = [getLogs(event), containersCleanupLogs].filter(Boolean).flat();
46-
return Promise.all(logs.map(async (log) => {
47-
await logDb.create({ jobId, hostId: hostConfig.id, ...log });
48-
}));
46+
return Promise.all(
47+
logs.map(async (log) => {
48+
await logDb.create({ jobId, hostId: hostConfig.id, ...log });
49+
})
50+
);
4951
};
5052

5153
if (!isBot && options.eventName !== 'manual-restart') {

src/backend/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ export const startServer = () => {
496496
)}/.well-known/openid-configuration`;
497497
const metadataRes = await fetch(metadataUrl);
498498
if (!metadataRes.ok) {
499-
mainLogger.error(`Failed to fetch OIDC metadata: ${metadataRes.statusText}`);
499+
mainLogger.error(`Failed to fetch OIDC metadata: ${metadataRes.statusText ?? ''}`);
500500
return Response.json({ error: `Failed to fetch OIDC metadata` }, { status: 500 });
501501
}
502502
const metadata = await metadataRes.json();

src/backend/utils/docker/remote-image-digest.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ const getAuthToken = async (
102102
const url = `${realm}?service=${service}&scope=${scope}`;
103103
const response = await fetch(url, { headers });
104104
if (!response.ok) {
105-
throw new Error(`HTTP error! status: ${response.status}`);
105+
throw new Error(`HTTP error! status: ${response.status ?? ''}`);
106106
}
107107
const data = await response.json();
108108
return data.token || data.access_token;
109109
} catch (error) {
110-
throw new Error(`Failed to get auth token: ${error.message}`);
110+
throw new Error(`Failed to get auth token: ${error.message ?? ''}`);
111111
}
112112
};
113113

@@ -167,7 +167,9 @@ const getRemoteImageDigest = async ({
167167
}
168168

169169
if (!response.ok) {
170-
throw new Error(`Failed to fetch manifest: ${response.status} ${response.statusText}`);
170+
throw new Error(
171+
`Failed to fetch manifest: ${response.status ?? ''} ${response.statusText ?? ''}`
172+
);
171173
}
172174

173175
const digest = response.headers.get('docker-content-digest');

src/backend/utils/exec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ export const createExec = (logger: Logger) => {
2121
code: typeof error.code === 'number' ? error.code : 1,
2222
};
2323
if (throwOnError) {
24-
logger.error(`${command} ${errorData.stderr} ${errorData.stdout} ${errorData.code}`);
24+
logger.error(
25+
`${command} ${errorData?.stderr ?? ''} ${errorData?.stdout ?? ''} ${errorData?.code ?? ''}`
26+
);
2527
throw errorData;
2628
}
2729
return errorData;

0 commit comments

Comments
 (0)