Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to run on IDX #448

Open
luc1d-ed opened this issue Nov 16, 2024 · 0 comments
Open

[BUG] Unable to run on IDX #448

luc1d-ed opened this issue Nov 16, 2024 · 0 comments

Comments

@luc1d-ed
Copy link

I wanted to run the project on the cloud and avoid installing docker on my PC. I have followed the README and configured everything correctly on the example config file. However I can't get it to run, the database does not recognize the user (Screenshot below). It says:

server-1 | [info] [DbLoop] starting for 0 users

Also the website displays that it is unable to contact to the server, which for context also did when I ran locally and I safely ignored because it still used to work, but that is not the case here.

Expected behavior

The website should be able to communicate with the server and display properly.

Additional context

DOCKER-CONFIG

services:
  server:
    image: yooooomi/your_spotify_server
    restart: always
    ports:
      - "8080:8080"
    links:
      - mongo
    depends_on:
      - mongo
    environment:
      API_ENDPOINT: http://localhost:8080 # This MUST be included as a valid URL in the spotify dashboard
      CLIENT_ENDPOINT: http://localhost:3000
      SPOTIFY_PUBLIC: [redacted]
      SPOTIFY_SECRET: [redacted]
      CORS: http://localhost:3000,http://localhost:3001 # "i-want-a-security-vulnerability-and-want-to-allow-all-origins" if you want to allow every origin

  mongo:
    container_name: mongo
    image: mongo:6
    restart: always
    volumes:
      - ./your_spotify_db:/data/db

  web:
    image: yooooomi/your_spotify_client
    restart: always
    ports:
      - "3000:3000"
    environment:
      API_ENDPOINT: http://localhost:8080

DEV.NIX (Used to configure IDX workspace)

# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
  # Which nixpkgs channel to use.
  channel = "stable-24.05"; # or "unstable"

  # Use https://search.nixos.org/packages to find packages
  packages = [
    # pkgs.go
     pkgs.python311
     pkgs.python311Packages.pip
     pkgs.docker-compose
    # pkgs.nodejs_20
    # pkgs.nodePackages.nodemon
  ];

  # Sets environment variables in the workspace
  env = {};
  services.docker.enable = true;
  idx = {
    # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
    extensions = [
      # "vscodevim.vim"
    ];

    # Enable previews
    previews = {
      enable = true;
      previews = {
        # web = {
        #   # Example: run "npm run dev" with PORT set to IDX's defined port for previews,
        #   # and show it in IDX's web preview panel
        #   command = ["npm" "run" "dev"];
        #   manager = "web";
        #   env = {
        #     # Environment variables to set for your server
        #     PORT = "$PORT";
        #   };
        # };
      };
    };

    # Workspace lifecycle hooks
    workspace = {
      # Runs when a workspace is first created
      onCreate = {
        # Example: install JS dependencies from NPM
        # npm-install = "npm install";
      };
      # Runs when the workspace is (re)started
      onStart = {
        # Example: start a background task to watch and re-build backend code
        # watch-backend = "npm run watch-backend";
      };
    };
  };
}

Screenshots

COMMAND LINE [0 USERS]

cmd-line

OPENING PAGE

localhost:3000

AUTHENTICATION PAGE

Screenshot 2024

@luc1d-ed luc1d-ed changed the title Unable to run on IDX [BUG] Unable to run on IDX Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant