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

Details for different port/address added #3124

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
12 changes: 11 additions & 1 deletion docs/developers/devel-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ configuration.
cp listenbrainz/config.py.sample listenbrainz/config.py

Now, open the new config.py file (don’t change config.py.sample) with your favorite
text editor and look for this section.
text editor.

.. note::

If you are accessing your development server using a port other than ``8100``,
ensure that you update the ``SERVER_BASE_URL`` to reflect the appropriate port number.
If you are accessing your development server using a host other than ``localhost`` (e.g., GitHub Codespaces),
ensure that you uncomment and update ``SERVER_NAME``, and ensure ``SERVER_ROOT_URL``is updated
accordingly to maintain consistency and support the appropriate host details.

Next look for this section in the file.

.. code-block:: yaml

Expand Down
9 changes: 6 additions & 3 deletions listenbrainz/config.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ SQLALCHEMY_TIMESCALE_URI = "postgresql://listenbrainz_ts:listenbrainz_ts@lb_db/l
TIMESCALE_ADMIN_URI = "postgresql://postgres:postgres@lb_db/postgres"
TIMESCALE_ADMIN_LB_URI = "postgresql://postgres:postgres@lb_db/listenbrainz_ts"

# Server address
# SERVER_NAME = "localhost:8100"

# MetaBrainz - used for retrieving donation info from metabrainz.org
SQLALCHEMY_METABRAINZ_URI = ""

Expand Down Expand Up @@ -157,7 +160,7 @@ WHITELISTED_AUTH_TOKENS = []
# SPOTIFY
SPOTIFY_CLIENT_ID = 'needs a non empty default value for tests, change this'
SPOTIFY_CLIENT_SECRET = 'needs a non empty default value for tests, change this'
SPOTIFY_CALLBACK_URL = 'http://localhost:8100/settings/music-services/spotify/callback/'
SPOTIFY_CALLBACK_URL = f'{SERVER_ROOT_URL}/settings/music-services/spotify/callback/'

# SPOTIFY-CACHE
SPOTIFY_CACHE_CLIENT_ID = 'needs a non empty default value for tests, change this'
Expand All @@ -166,12 +169,12 @@ SPOTIFY_CACHE_CLIENT_SECRET = 'needs a non empty default value for tests, change
# SOUNDCLOUD
SOUNDCLOUD_CLIENT_ID = 'needs a non empty default value for tests, change this'
SOUNDCLOUD_CLIENT_SECRET = 'needs a non empty default value for tests, change this'
SOUNDCLOUD_REDIRECT_URI = 'http://localhost:8100/settings/music-services/soundcloud/callback/'
SOUNDCLOUD_REDIRECT_URI = f'{SERVER_ROOT_URL}/settings/music-services/soundcloud/callback/'

# CRITIQUEBRAINZ
CRITIQUEBRAINZ_CLIENT_ID = 'needs a non empty default value for tests, change this'
CRITIQUEBRAINZ_CLIENT_SECRET = 'needs a non empty default value for tests, change this'
CRITIQUEBRAINZ_REDIRECT_URI = 'http://localhost:8100/settings/music-services/critiquebrainz/callback/'
CRITIQUEBRAINZ_REDIRECT_URI = f'{SERVER_ROOT_URL}/settings/music-services/critiquebrainz/callback/'

# APPLE MUSIC
APPLE_MUSIC_TEAM_ID = 'needs a non empty default value for tests, change this'
Expand Down
Loading