Skip to content

Commit

Permalink
Merge branch 'master' of github.com:metabrainz/metabrainz.org
Browse files Browse the repository at this point in the history
  • Loading branch information
mayhem committed Jan 1, 2024
2 parents b0e654c + a84b082 commit 8258b2b
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 103 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_BASE_IMAGE_VERSION=3.11-20221221
ARG PYTHON_BASE_IMAGE_VERSION=3.11-20231006
ARG NODE_VERSION=18-alpine
FROM metabrainz/python:$PYTHON_BASE_IMAGE_VERSION as metabrainz-base

Expand Down Expand Up @@ -83,7 +83,7 @@ RUN npm run build:prod
###########################################
FROM metabrainz-base as metabrainz-prod

RUN pip install --no-cache-dir uWSGI==2.0.22
RUN pip install --no-cache-dir uWSGI==2.0.23

COPY ./docker/prod/consul-template-uwsgi.conf /etc/

Expand Down
4 changes: 2 additions & 2 deletions docker/prod/consul-template-uwsgi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ template {
}

exec {
command = "uwsgi /etc/uwsgi/uwsgi.ini"
splay = "30s"
command = ["uwsgi", "/etc/uwsgi/uwsgi.ini"]
splay = "5s"
reload_signal = "SIGHUP"
kill_signal = "SIGTERM"
kill_timeout = "30s"
Expand Down
5 changes: 3 additions & 2 deletions docker/prod/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[uwsgi]
uid = www-data
gid = www-data
master = true
socket = 0.0.0.0:13031
module = metabrainz
Expand All @@ -11,5 +13,4 @@ log-x-forwarded-for=true
disable-logging = true
; quit uwsgi if the python app fails to load
need-app = true
; when uwsgi gets a sighup, quit completely and let runit restart us
exit-on-reload = true
die-on-term = true
4 changes: 2 additions & 2 deletions frontend/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ h1.page-title, h2.page-title {
}

// Projects page
#projects {
#projects-list > div {
.projects {
.projects-list > div {
padding: 10px;
.clearfix;
.logo-container {
Expand Down
Binary file removed frontend/img/logos/sponsors/dotsrc.png
Binary file not shown.
Binary file removed frontend/img/logos/sponsors/osl.png
Binary file not shown.
9 changes: 5 additions & 4 deletions metabrainz/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,17 @@
<div class="title"><a href="{{ url_for('index.contact') }}">{{ _('Contact us') }}</a></div>
<ul>
<li><a href="https://blog.metabrainz.org/category/metabrainz/">{{ _('Blog') }}</a></li>
<li><a href="https://twitter.com/MetaBrainz">{{ _('Twitter') }}</a></li>
<li><a href="https://twitter.com/MetaBrainz">{{ _('Twitter/X') }}</a></li>
<li><a href="https://mastodon.social/@metabrainz">{{ _('Mastodon') }}</a></li>
<li><a href="https://bsky.app/profile/metabrainz.bsky.social">{{ _('Bluesky') }}</a></li>
<li><a href="https://www.instagram.com/MetaBrainz/">{{ _('Instagram') }}</a></li>
</ul>
</div>
</div>
<div class="lower-footer">
{{ _('Sponsored by <a href="%(google_url)s">Google</a>,
<a href="%(osuosl_url)s">OSUOSL</a> and
{{ _('Sponsored by <a href="%(google_url)s">Google</a> and
<a href="%(sponsors_url)s">others&hellip;</a>',
sponsors_url=url_for('index.sponsors'),
osuosl_url='https://osuosl.org/',
google_url='https://www.google.com/') }}
</div>
</div>
Expand Down
12 changes: 0 additions & 12 deletions metabrainz/templates/index/datasets/download.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,34 @@ <h3>MetaBrainz Database Dumps</h3>
<h4 class="panel-heading">MusicBrainz PostgreSQL Data Dumps</h4>
<ul class="list-group">
<li class="list-group-item"><a href="https://data.metabrainz.org/pub/musicbrainz/data/fullexport/">https://data.metabrainz.org/pub/musicbrainz/data/fullexport/</a> (Germany, EU)</li>
<li class="list-group-item"><a href="https://ftp.osuosl.org/pub/musicbrainz/data/fullexport/">https://ftp.osuosl.org/pub/musicbrainz/data/fullexport/</a> (Oregon, USA)</li>
<li class="list-group-item"><a href="https://mirrors.dotsrc.org/MusicBrainz/data/fullexport/">https://mirrors.dotsrc.org/MusicBrainz/data/fullexport/</a> (Denmark, EU)</li>
</ul>
</div>

<div class="panel panel-default dataset-panel">
<h4 class="panel-heading">MusicBrainz JSON Data Dumps</h4>
<ul class="list-group">
<li class="list-group-item"><a href="https://data.metabrainz.org/pub/musicbrainz/data/json-dumps">https://data.metabrainz.org/pub/musicbrainz/data/json-dumps</a> (Germany, EU)</li>
<li class="list-group-item"><a href="https://ftp.osuosl.org/pub/musicbrainz/data/json-dumps">https://ftp.osuosl.org/pub/musicbrainz/data/json-dumps</a> (Oregon, USA)</li>
<li class="list-group-item"><a href="https://mirrors.dotsrc.org/MusicBrainz/data/json-dumps">https://mirrors.dotsrc.org/MusicBrainz/data/json-dumps</a> (Denmark, EU)</li>
</ul>
</div>

<div class="panel panel-default dataset-panel">
<h4 class="panel-heading">Full ListenBrainz PostgreSQL Data Dumps</h4>
<ul class="list-group">
<li class="list-group-item"><a href="https://data.metabrainz.org/pub/musicbrainz/listenbrainz/fullexport/">https://data.metabrainz.org/pub/musicbrainz/listenbrainz/fullexport/</a> (Germany, EU)</li>
<li class="list-group-item"><a href="https://ftp.osuosl.org/pub/musicbrainz/listenbrainz/fullexport/">https://ftp.osuosl.org/pub/musicbrainz/listenbrainz/fullexport/</a> (Oregon, USA)</li>
<li class="list-group-item"><a href="https://mirrors.dotsrc.org/MusicBrainz/listenbrainz/fullexport/">https://mirrors.dotsrc.org/MusicBrainz/listenbrainz/fullexport/</a> (Denmark, EU)</li>
</ul>
</div>

<div class="panel panel-default dataset-panel">
<h4 class="panel-heading">Incremental ListenBrainz PostgreSQL Data Dumps</h4>
<ul class="list-group">
<li class="list-group-item"><a href="https://data.metabrainz.org/pub/musicbrainz/listenbrainz/incremental/">https://data.metabrainz.org/pub/musicbrainz/listenbrainz/incremental/</a> (Germany, EU)</li>
<li class="list-group-item"><a href="https://ftp.osuosl.org/pub/musicbrainz/listenbrainz/incremental/">https://ftp.osuosl.org/pub/musicbrainz/listenbrainz/incremental/</a> (Oregon, USA)</li>
<li class="list-group-item"><a href="https://mirrors.dotsrc.org/MusicBrainz/listenbrainz/incremental/">https://mirrors.dotsrc.org/MusicBrainz/listenbrainz/incremental/</a> (Denmark, EU)</li>
</ul>
</div>

<div class="panel panel-default dataset-panel">
<h4 class="panel-heading">CritiqueBrainz PostgreSQL Data Dumps</h4>
<ul class="list-group">
<li class="list-group-item"><a href="https://data.metabrainz.org/pub/musicbrainz/critiquebrainz/">https://data.metabrainz.org/pub/musicbrainz/critiquebrainz/</a> (Germany, EU)</li>
<li class="list-group-item"><a href="https://ftp.osuosl.org/pub/musicbrainz/critiquebrainz/">https://ftp.osuosl.org/pub/musicbrainz/critiquebrainz/</a> (Oregon, USA)</li>
<li class="list-group-item"><a href="https://mirrors.dotsrc.org/MusicBrainz/critiquebrainz/">https://mirrors.dotsrc.org/MusicBrainz/critiquebrainz/</a> (Denmark, EU)</li>
</ul>
</div>

Expand All @@ -62,8 +52,6 @@ <h3>MetaBrainz Derived Dumps</h3>
<h4 class="panel-heading">MusicBrainz Canonical Data Dumps</h4>
<ul class="list-group">
<li class="list-group-item"><a href="https://data.metabrainz.org/pub/musicbrainz/canonical_data/">https://data.metabrainz.org/pub/musicbrainz/canonical_data/</a> (Germany, EU)</li>
<li class="list-group-item"><a href="https://ftp.osuosl.org/pub/musicbrainz/canonical_data/">https://ftp.osuosl.org/pub/musicbrainz/canonical_data/</a> (Oregon, USA)</li>
<li class="list-group-item"><a href="https://mirrors.dotsrc.org/MusicBrainz/canonical_data/">https://mirrors.dotsrc.org/MusicBrainz/canonical_data/</a> (Denmark, EU)</li>
</ul>
</div>

Expand Down
2 changes: 1 addition & 1 deletion metabrainz/templates/index/gdpr.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ <h2>{{ _('Restriction of processing') }}</h2>
<p>
The ListenBrainz project differs in that the Listens (metadata about what music you have listened to) are stored on our servers
and <a href="https://listenbrainz.org/data">made available to the public</a>. We believe Listens to be personally identifying
data and furthermore, we have goals of creating open source recommendation engines with this data, which is becomes processing the
data and furthermore, we have goals of creating open source recommendation engines with this data, which involves processing the
user’s data. These two points are fundamental goals of the ListenBrainz project and we do not see a reasonable way to reach another
compromise position.
</p>
Expand Down
4 changes: 2 additions & 2 deletions metabrainz/templates/index/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ <h3>{{ _('Cookies') }}</h3>
<h3>{{ _('Web and FTP access logs') }}</h3>

<p>
In a practice similar to other web sites we keep logs of all web requests made against our servers. These logs include: your IP
address, your browser's "User-Agent" string, and which page you requested. Aggregate information about web and FTP traffic is
In a practice similar to other web sites (and APIs) we keep logs of all web requests made against our servers. These logs include: your IP
address, your browser's (or API client's) "User-Agent" string, and which page (or API endpoint) you requested with which parameters. Aggregate information about web and FTP traffic is
made available to the public via our site usage pages.
</p>

Expand Down
49 changes: 29 additions & 20 deletions metabrainz/templates/index/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

{% block content %}
<h1 class="page-title">{{ _('MetaBrainz Projects') }}</h1>
<div id="projects">
<div class="projects">

<div id="projects-list" class="row">
<div class="projects-list row">
<div class="col-md-6">
<div class="logo-container">
<a href="https://musicbrainz.org/">
Expand Down Expand Up @@ -68,23 +68,6 @@ <h1 class="page-title">{{ _('MetaBrainz Projects') }}</h1>
</div>
</div>

<div class="col-md-6">
<div class="logo-container">
<a href="https://acousticbrainz.org/">
<img src="{{ url_for('static', filename='img/projects/acousticbrainz.svg') }}" alt="AcousticBrainz logo">
</a>
</div>
<div>
<span class="title">{{ _('AcousticBrainz') }}</span>
<p>
{{ _('<a href="%(ab_url)s">AcousticBrainz</a> crowd sources acoustic information for all music in
the world and makes it available to the public. It is a joint effort with
<a href="%(mtg_url)s">Music Technology Group</a> at <a href="%(upf_url)s">Universitat Pompeu Fabra</a>
in Barcelona.', ab_url='https://acousticbrainz.org/', mtg_url='http://www.mtg.upf.edu/', upf_url='https://www.upf.edu/') }}
</p>
</div>
</div>

<div class="col-md-6">
<div class="logo-container">
<a href="https://bookbrainz.org/">
Expand Down Expand Up @@ -114,6 +97,30 @@ <h1 class="page-title">{{ _('MetaBrainz Projects') }}</h1>
</p>
</div>
</div>
</div>

</div>

<h2>{{ _('Past Projects') }}</h2>
<div class="projects">

<div class="projects-list row">
<div class="col-md-6">
<div class="logo-container">
<a href="https://acousticbrainz.org/">
<img src="{{ url_for('static', filename='img/projects/acousticbrainz.svg') }}" alt="AcousticBrainz logo">
</a>
</div>
<div>
<span class="title">{{ _('AcousticBrainz') }}</span>
<p>
{{ _('<a href="%(ab_url)s">AcousticBrainz</a> crowd sourced acoustic information for all music in
the world and made it available to the public. It was a joint effort with
<a href="%(mtg_url)s">Music Technology Group</a> at <a href="%(upf_url)s">Universitat Pompeu Fabra</a>
in Barcelona.', ab_url='https://acousticbrainz.org/', mtg_url='http://www.mtg.upf.edu/', upf_url='https://www.upf.edu/') }}
</p>
</div>
</div>

<div class="col-md-6">
<div class="logo-container">
Expand All @@ -125,11 +132,13 @@ <h1 class="page-title">{{ _('MetaBrainz Projects') }}</h1>
<span class="title">{{ _('MessyBrainz') }}</span>
<p>
{{ _('<a href="%(messybrainz_url)s">MessyBrainz</a> identifies unclean metadata, and where possible,
links it to stable MusicBrainz identifiers. MessyBrainz is currently being used for AcousticBrainz and ListenBrainz.', messybrainz_url='https://messybrainz.org/') }}
links it to stable MusicBrainz identifiers. MessyBrainz was used for AcousticBrainz and is still being
used in ListenBrainz.', messybrainz_url='https://messybrainz.org/') }}
</p>
</div>
</div>
</div>

</div>

{% endblock %}
19 changes: 0 additions & 19 deletions metabrainz/templates/index/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,6 @@ <h2>{{ _('Sponsors') }}</h2>
</td>
</tr>

<tr>
<td><img src="{{ url_for('static', filename='img/logos/sponsors/osl.png') }}"></td>
<td>
{{ _('The <b><a href="%(osuosl_url)s">OSU Open Source Lab</a></b> hosts the FTP
mirror server that handles the distribution of the
<a href="%(mb_db_url)s">MusicBrainz Database</a>
and virtual machines, thus saving us considerable load and bandwidth costs.', osuosl_url='https://osuosl.org/', mb_db_url='https://musicbrainz.org/doc/MusicBrainz_Database') }}
</td>
</tr>

<tr>
<td><img src="{{ url_for('static', filename='img/logos/sponsors/dotsrc.png') }}"></td>
<td>
{{ _('<b><a href="%(dotsrc_url)s">DotSrc</a></b> hosts an
<a href="%(mb_ftp_url)s">EU mirror of our FTP site</a>.
This gives better download speeds of our large data sets for supporters in Europe.', dotsrc_url='http://dotsrc.org/', mb_ftp_url='ftp://mirrors.dotsrc.org/MusicBrainz') }}
</td>
</tr>

<tr>
<td><img src="{{ url_for('static', filename='img/logos/sponsors/github.svg') }}"></td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion metabrainz/templates/index/team.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h4>{{ _('<span class="name">Robert Kaye</span> &mdash; Executive Director') }}<
<ul class="links">
<li><strong>IRC:</strong> mayhem</li>
<li><strong>GitHub:</strong> <a href="https://github.com/mayhem">mayhem</a></li>
<li><strong>Twitter:</strong> <a href="https://twitter.com/mayhembcn">mayhemBCN</a></li>
<li><strong>Twitter/X:</strong> <a href="https://twitter.com/mayhembcn">mayhemBCN</a></li>
</ul>
</div>
</div>
Expand Down
97 changes: 61 additions & 36 deletions metabrainz/templates/users/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,59 +75,84 @@ <h3>{{ _('Contact information') }}</h3>
{% if current_user.is_commercial %}
{% if current_user.state in ('active', 'limited') and current_user.good_standing %}
<h3>{{ _('Data use permission granted') }}</h3>
<p>
{{ _('You have permission to use any of the data published by the MetaBrainz
Foundation. This includes data dumps released under a Creative Commons
non-commercial license. Thank you for your support!') }}
</p>
<p>
{{ _('Note 1: If your support falls behind by more than 60 days, this
permission may be withdrawn. You can always check your current permission
status on this page.') }}
</p>
<p>
{{ _('Note 2: The IP addresses from which replication packets for the Live Data Feed are downloaded are logged.') }}
</p>
<div style="font-size: 13pt">
<p>
<b>Your support agreement has been completed -- thank you!</b>
</p>
<p>
{{ _('You have permission to use any of the data published by the MetaBrainz
Foundation. This includes data dumps released under a Creative Commons
non-commercial license. Thank you for your support!') }}
</p>
<p>
{{ _('Note 1: If your support falls behind by more than 60 days, this
permission may be withdrawn. You can always check your current permission
status on this page.') }}
</p>
<p>
{{ _('Note 2: The IP addresses from which replication packets for the Live Data Feed are downloaded are logged.') }}
</p>
</div>
{% else %}
<h3>{{ _('Limited data use permission granted') }}</h3>
<p>
{{ _('You do not currently have permission to use data released under a Creative Commons non-commercial license for commercial purposes.') }}
</p>
<p>
{{ _('Reason:') }}
<h3>Limited/no data use permission granted</h3>
<div style="font-size: 13pt">
{% if current_user.state == 'rejected' %}
{{ _('Your application for using the Live Data Feed has been rejected.') }}
<p>
<b>Your application for using the Live Data Feed has been rejected.</b>
</p>
<p>
You do not have permission to use our data in a public commercial product.
</p>
{% elif current_user.state == 'pending' %}
{{ _('Your application for using the Live Data Feed is still pending. You may use our data and APIs for evaluation purposes while your application is pending.') }}
<p>
<b>Your application for using the Live Data Feed is still pending.</b>
</p>
<p>
You may use our data and APIs for evaluation/development purposes
while your application is pending.
</p>
{% elif current_user.state == 'waiting' %}
{{ _('Your application for using the Live Data Feed is in the waiting list. You may use our data and APIs for evaluation purposes while your application is pending.') }}
<p>
<b>Your application for using the Live Data Feed is waiting to finalize our support agreement.</b>
</p>
<p>
You may use our data and APIs for evaluation and development purposes, but you may not use the data in a public
commercial product. Once you are nearing the public release of a product that contains our data, please
<a href="/contact">contact us</a> again to finalize our support agreement.
</p>
{% elif not current_user.good_standing %}
{{ _('Your account sign-up is incomplete or your account is in bad standing, which means that you are more than
60 days behind in support payments. If you think this is a mistake,
please <a href="%(contact_url)s">contact us</a>.', contact_url=url_for('index.contact')) }}
<p>
<b>Your use of the Live Data Feed is pending suspension.</b>
</p>
<p>
Your account is in bad standing, which means that you are more than 60 days behind in support payments. If you think
this is a mistake, please <a href="/contact">contact us</a>.
</p>
{% else %}
{{ _('Unknown. :(') }}
{% endif %}
</p>
</div>
{% endif %}
{% endif %}

{% if current_user.state in ('active', 'limited') and current_user.good_standing %}
<h2>{{ _('Data Download') }}</h2>

{% if not current_user.is_commercial %}
<div style="font-size: 13pt">
{% if not current_user.is_commercial %}
<p>
Thank you for registering with us -- we really appreciate it!
</p>
{% endif %}

<p>
Thank you for registering with us -- we really appreciated it!
Please proceed to our download page to download our datasets:
</p>
{% endif %}

<p>
Please proceed to our download page to download our datasets:
</p>

<p>
<a href="{{ url_for("index.download") }}" class="btn btn-lg btn-primary">Download Datasets</a>
</p>
<p>
<a href="{{ url_for("index.download") }}" class="btn btn-lg btn-primary">Download Datasets</a>
</p>
</div>
{% endif %}

{% if current_user.state == 'active' %}
Expand Down

0 comments on commit 8258b2b

Please sign in to comment.