diff --git a/compose.local.yaml b/compose.local.yaml index 3fd557c8..3e9b4c20 100644 --- a/compose.local.yaml +++ b/compose.local.yaml @@ -37,16 +37,16 @@ services: - rauthy:/app/data backend: - image: leaf-rpc-server:main + image: ghcr.io/muni-town/leaf-rpc-server:main environment: DATA_DIR: /data volumes: - data:/data - build: - dockerfile: leaf-rpc-server.Dockerfile + # build: + # dockerfile: leaf-rpc-server.Dockerfile weird: - image: weird:main + image: ghcr.io/muni-town/weird:main env_file: .env.local environment: BODY_SIZE_LIMIT: 15M @@ -54,8 +54,10 @@ services: BACKEND_URL: http://backend:7431 ports: - 9523:3000 - build: - dockerfile: weird.Dockerfile + - 7753:7753/udp + - 7753:7753/tcp + # build: + # dockerfile: weird.Dockerfile volumes: rauthy: diff --git a/src/lib/dns/server.ts b/src/lib/dns/server.ts index 6e401190..1820f7ad 100644 --- a/src/lib/dns/server.ts +++ b/src/lib/dns/server.ts @@ -55,7 +55,7 @@ export async function startDnsServer() { // Because Weird is both the DNS server and the app server, we look up // the NS ( nameserver ) records associated to our public domain. const appDomain = pubenv.PUBLIC_DOMAIN.split(':')[0]; - const appParentDomain = appDomain.split('.').slice(-2).join('.') + const appParentDomain = appDomain.split('.').slice(-2).join('.'); const selfIps = (await new Promise((finish) => { dns.resolveNs(appParentDomain, (err, addrs) => { if (err) { diff --git a/weird.Dockerfile b/weird.Dockerfile index ed523292..fc876b89 100644 --- a/weird.Dockerfile +++ b/weird.Dockerfile @@ -1,10 +1,10 @@ -FROM node:20-alpine AS build +FROM node:20-slim AS build # Add certificate and uncomment if building behind proxy with custom cert # COPY ./gitignore/ca-certificates.crt /etc/ssl/cert.pem ENV NODE_EXTRA_CA_CERTS=/etc/ssl/cert.pem -RUN apk add python3 make g++ --no-cache +RUN apt-get update && apt-get install python3 make g++ -y RUN npm i -g pnpm COPY . /project WORKDIR /project @@ -12,7 +12,7 @@ RUN --mount=type=cache,target=/project/node_modules pnpm i && pnpm run build && RUN cp -r package.json pnpm-lock.yaml patches /build RUN cd /build && pnpm install --prod -FROM node:20-alpine +FROM node:20-slim COPY --from=build /build /project RUN adduser -D weird RUN chown -R weird:weird /project