Compare commits

...

4 Commits

Author SHA1 Message Date
Aarnav Tale 37f84cfba5 fix: use the request url protocol for oidc 2024-03-30 05:26:22 -04:00
Aarnav Tale 52c8e2c3bc fix: remix relies on build dir 2024-03-30 05:06:17 -04:00
Aarnav Tale 0a8d3e26f4 chore: we now have images! 2024-03-30 04:51:37 -04:00
Aarnav Tale 9342e81733 chore: wording on actions should be ghcr.io 2024-03-30 04:51:34 -04:00
4 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ on:
jobs:
publish:
name: Push Docker image to Docker Hub
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Check out the repo
@@ -18,7 +18,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
+2 -2
View File
@@ -11,11 +11,11 @@ RUN pnpm prune --prod
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/build /app
COPY --from=build /app/build /app/build
COPY --from=build /app/node_modules /app/node_modules
RUN echo '{"type":"module"}' > /app/package.json
EXPOSE 3000
ENV NODE_ENV=production
ENV HOST=0.0.0.0
CMD [ "node_modules/.bin/remix-serve", "server/index.js" ]
CMD [ "node_modules/.bin/remix-serve", "./build/server/index.js" ]
-2
View File
@@ -14,8 +14,6 @@ It's still very early in it's development, however these are some of the feature
- [x] Editable headscale configuration
## Deployment
> The docker image is not available yet. For now you can build it locally with `docker build -t ghcr.io/tale/headplane:latest .`
- If you run Headscale in a Docker container, see the [Advanced Deployment](/docs/Advanced-Integration.md) guide.
- If you run Headscale natively, see the [Basic Deployment](/docs/Basic-Integration.md) guide.
+6
View File
@@ -43,7 +43,10 @@ export async function startOidc(issuer: string, client: string, request: Request
const nonce = generateRandomNonce()
const verifier = generateRandomCodeVerifier()
const challenge = await calculatePKCECodeChallenge(verifier)
const callback = new URL('/admin/oidc/callback', request.url)
callback.protocol = request.url.includes('localhost') ? 'http:' : 'https:'
callback.hostname = request.headers.get('Host') ?? ''
const authUrl = new URL(processed.authorization_endpoint)
authUrl.searchParams.set('client_id', oidcClient.client_id)
@@ -106,6 +109,9 @@ export async function finishOidc(issuer: string, client: string, secret: string,
}
const callback = new URL('/admin/oidc/callback', request.url)
callback.protocol = request.url.includes('localhost') ? 'http:' : 'https:'
callback.hostname = request.headers.get('Host') ?? ''
const tokenResponse = await authorizationCodeGrantRequest(processed, oidcClient, parameters, callback.href, verifier)
const challenges = parseWwwAuthenticateChallenges(tokenResponse)
if (challenges) {