Git Product home page Git Product logo

browser-broadcast-box's Issues

Error fetching public IP

Where can I specify the PUBLIC_IP in a .env file? I am getting a public IP not found error

async function init() {
  for (const envPath of ["./.env.local", "./.env"]) {
    try {
      loadSync({ envPath: envPath, export: true });
    } catch (_e) {
      // Ignore
    }
  }

  if (!Deno.env.get("PUBLIC_IP")) {
    const publicIp = await detectPublicIp();
    if (publicIp) Deno.env.set("PUBLIC_IP", publicIp);
  }

  if (Deno.env.get("BEARER_TOKEN")) console.log("Bearer token is set");

  const dbPath = Deno.env.get("DB") || "./db.sqlite3";
  const DB = new D1Database(dbPath);
  const migrations = new TextDecoder().decode(
    Deno.readFileSync("./server/migrations.sql")
  );
  DB.exec(migrations);
  bindings = { ...Deno.env.toObject(), DB };
}

anand@chi1:~/browser-broadcast-box$ docker compose up
[+] Running 6/6
 ⠿ chrome Pulled                                                          24.4s
   ⠿ f56be85fc22e Pull complete                                            0.9s
   ⠿ c691cfdca2fd Pull complete                                           21.3s
   ⠿ bf2668cbf258 Pull complete                                           21.4s
   ⠿ 34dc035d5a52 Pull complete                                           21.5s
   ⠿ 4f4fb700ef54 Pull complete                                           21.7s
[+] Running 3/3
 ⠿ Network browser-broadcast-box_default      Created                      0.1s
 ⠿ Container browser-broadcast-box-backend-1  Created                      0.1s
 ⠿ Container browser-broadcast-box-chrome-1   Created                      0.0s
Attaching to browser-broadcast-box-backend-1, browser-broadcast-box-chrome-1
browser-broadcast-box-backend-1  | Task prod deno run -A server/main.ts
browser-broadcast-box-backend-1  | Fetching public IP...
browser-broadcast-box-backend-1  | Listening on http://localhost:11733/
browser-broadcast-box-chrome-1   | [0412/170034.073710:ERROR:headless_shell.cc(255)] Multiple targets are not supported.
browser-broadcast-box-chrome-1 exited with code 1
browser-broadcast-box-backend-1  | No public IP found
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...
[+] Running 1/2
 ⠿ Container browser-broadcast-box-chrome-1   Stopped                      0.0s
[+] Running 2/2owser-broadcast-box-backend-1  Stopping                     0.2s
[+] Running 0/1owser-broadcast-box-chrome-1   Stopped                      0.0s
 ⠿ Container browser-broadcast-box-backend-1  Error while Killing          0.2s
canceled
anand@chi1:~/browser-broadcast-box$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.