DEV Community

Eakam
Eakam

Posted on

Setting up Telescope

This week, I decided to setup Telescope locally. I had previously contributed to telescope and had set it up already. However, I faced some problems starting it up locally after a shutdown and startup sequence. This was hard to debug since there was no error message, just containers on docker would not start up even after waiting for several minutes. These problems would fix after a restart or just randomly after a few tries. So, I decided to go through the setup again.

Following the instructions here, I made sure pnpm was installed, and updated WSL2 packages by running the following commands:

sudo apt update
sudo apt upgrade
Enter fullscreen mode Exit fullscreen mode

I already had docker setup and installed. I tried following the instructions to start docker with the following command in wsl2:

sudo systemctl start docker
Enter fullscreen mode Exit fullscreen mode

However, I got the following error message:

System has not been booted with systemd as init system (PID 1)
Failed to connect to bus: Host is down
Enter fullscreen mode Exit fullscreen mode

Usually, I would try to figure out why this message was showing up. However, since I did not use this command the last time I used telescope locally, I simply started docker using the desktop client and decided to ignore this command.
This worked, and after running pnpm services:start, I was able to start telescope normally.

Next, I followed the instructions to seed the database. Though, for the db:init script to work, I had to copy over the value for the DATABASE_URL form the db/env.example file. Finally, I wanted to get local login and sign-up process working. This is done by a test SAML SSO provider, and the instructions are separate from the environment setup. I ran the docker-compose up -build command.
However, I got the following error message:
unknown shorthand flag: 'b' in -build

I remembered something similar the last time I worked with Telescope. The solution to this was to run the following command instead:
docker-compose up --build
Thus, using --build instead of -build. This solved the issue, and I was able to get the login component working locally.
Though, I later found that all of this can be avoided by running pnpm services:start, and then running docker-compose up login.

Top comments (0)