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

Update LB public ports. again. #1781

Merged
merged 3 commits into from Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions docker/docker-compose.yml
Expand Up @@ -49,7 +49,7 @@ services:
- ..:/code/listenbrainz:z
- ../listenbrainz/webserver/static:/static
ports:
- "7000:80"
- "8100:80"
depends_on:
- redis
- lb_db
Expand All @@ -60,9 +60,9 @@ services:
environment:
FLASK_APP: listenbrainz.webserver:create_api_compat_app()
FLASK_ENV: development
command: flask run -h 0.0.0.0 -p 7080
command: flask run -h 0.0.0.0 -p 8101
ports:
- "7080:7080"
- "8101:8101"
volumes:
- ..:/code/listenbrainz:z
depends_on:
Expand Down Expand Up @@ -92,9 +92,9 @@ services:
image: web
volumes:
- ..:/code/listenbrainz:z
command: python manage.py run_websockets -h 0.0.0.0 -p 7082
command: python manage.py run_websockets -h 0.0.0.0 -p 8102
ports:
- "7082:7082"
- "8102:8102"
depends_on:
- redis
- rabbitmq
Expand Down
16 changes: 8 additions & 8 deletions docs/developers/devel-env.rst
Expand Up @@ -49,7 +49,7 @@ option to `register`_ your application. Fill out the form with the following dat

- **Type**: ``Web Application``

- **Callback URL**: ``http://localhost/login/musicbrainz/post/``
- **Callback URL**: ``http://localhost:8100/login/musicbrainz/post/``

After entering this information, you'll have an OAuth client ID and OAuth client
secret. You'll use these for configuring ListenBrainz.
Expand Down Expand Up @@ -92,10 +92,10 @@ register for one at the `Last.fm API page`_. Look for the following section in `

Update the ``LASTFM_API_KEY`` field with your Last.fm API key.

You also need to update the ``API_URL`` field value to ``http://localhost``.
You also need to update the ``API_URL`` field value to ``http://localhost:8100``.

To use the Spotify importer you need to register an application on the
`Spotify Developer Dashboard`_. Use ``http://localhost/profile/music-services/spotify/callback/``
`Spotify Developer Dashboard`_. Use ``http://localhost:8100/profile/music-services/spotify/callback/``
as the callback URL.

After that, fill out the Spotify client ID and client secret in the following
Expand All @@ -118,7 +118,7 @@ section of the file.


To use the CritiqueBrainz reviewer, you'll need to visit the `CritiqueBrainz applications page`_
and create/register an application. Use ``http://localhost/`` as the homepage URL and ``http://localhost/profile/music-services/critiquebrainz/callback/``
and create/register an application. Use ``http://localhost:8100/`` as the homepage URL and ``http://localhost:8100/profile/music-services/critiquebrainz/callback/``
as the callback URL.

After registering, update the CritiqueBrainz section of the file with the client ID and client secret
Expand All @@ -129,7 +129,7 @@ you obtained.
# CRITIQUEBRAINZ
CRITIQUEBRAINZ_CLIENT_ID = ''
CRITIQUEBRAINZ_CLIENT_SECRET = ''
CRITIQUEBRAINZ_REDIRECT_URI = 'http://localhost/profile/music-services/critiquebrainz/callback/'
CRITIQUEBRAINZ_REDIRECT_URI = 'http://localhost:8100/profile/music-services/critiquebrainz/callback/'

.. note::

Expand Down Expand Up @@ -182,14 +182,14 @@ environment by running ``develop.sh up``.

.. note::

By default, the web service listens on port 7000. If you already have a service listening
By default, the web service listens on port 8100. If you already have a service listening
on this port, then you can change it by updating the ports section of ``docker/docker-compose.yml``.


.. code-block:: bash

ports:
- "7000:80"
- "8100:80"

To change the listening port, change only the value before the ":" to the port of your choice
and point your browser to ``http://localhost:<Port>``
Expand All @@ -199,7 +199,7 @@ by pressing CTRL^C. Once everything is running, visit your new site in a browser

.. code-block:: none

http://localhost
http://localhost:8100

Now, you are all set to begin making changes and seeing them in real-time inside
of your development environment. If you make changes to python code, the server will be
Expand Down
18 changes: 9 additions & 9 deletions listenbrainz/config.py.sample
Expand Up @@ -121,11 +121,11 @@ UPLOAD_FOLDER = "/tmp/lastfm-backup-upload"

# Set to "https://api.listenbrainz.org" if you want to work on frontend for user statistics
# without going through the process of generating the stats in local environment. Otherwise,
# set it to "http://localhost:7000"
# set it to "http://localhost:8100"
API_URL = 'https://api.listenbrainz.org'
LASTFM_PROXY_URL = 'http://localhost:7080/'
SERVER_ROOT_URL = 'http://localhost:7000'
WEBSOCKETS_SERVER_URL = 'http://localhost:7082'
LASTFM_PROXY_URL = 'http://localhost:8101/'
SERVER_ROOT_URL = 'http://localhost:8100'
WEBSOCKETS_SERVER_URL = 'http://localhost:8102'
MUSICBRAINZ_OAUTH_URL = 'https://musicbrainz.org/oauth2/userinfo'
LISTENBRAINZ_LABS_API_URL = 'https://labs.api.listenbrainz.org'

Expand All @@ -144,12 +144,12 @@ 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/profile/music-services/spotify/callback/'
SPOTIFY_CALLBACK_URL = 'http://localhost:8100/profile/music-services/spotify/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/profile/music-services/critiquebrainz/callback/'
CRITIQUEBRAINZ_REDIRECT_URI = 'http://localhost:8100/profile/music-services/critiquebrainz/callback/'

# YOUTUBE
YOUTUBE_CONFIG = {
Expand All @@ -160,12 +160,12 @@ YOUTUBE_CONFIG = {
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "fake-client-secret",
"redirect_uris": ["http://localhost/profile/music-services/youtube/callback/"],
"javascript_origins": ["http://localhost"]
"redirect_uris": ["http://localhost:8100/profile/music-services/youtube/callback/"],
"javascript_origins": ["http://localhost:8100"]
}
}
YOUTUBE_API_KEY = 'change me'
YOUTUBE_REDIRECT_URI = 'http://localhost/profile/music-services/youtube/callback/'
YOUTUBE_REDIRECT_URI = 'http://localhost:8100/profile/music-services/youtube/callback/'

# This is set to False to stop a warning from flask_sqlalchemy.
# We do not use this feature at all, so it is safe to set to False.
Expand Down