...
 
Commits (3)
Can now add a description to radios and better radio cards (#331)
FUNKWHALE_URL=http://localhost
DATABASE_URL=postgresql://postgres@postgres:5432/postgres
CACHE_URL=redis://redis:6379/0
MEDIA_ROOT=/opt/funkwhale/data/media
STATIC_ROOT=/opt/funkwhale/data/static
DJANGO_ALLOWED_HOSTS=localhost
DJANGO_SETTINGS_MODULE=config.settings.production
DJANGO_SECRET_KEY=
DJANGO_ADMIN_URL=^api/admin/
LOGLEVEL=INFO
REVERSE_PROXY_TYPE=nginx
FROM docker.io/matrixdotorg/base-caddy
LABEL maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz"
ENV UID=1337 \
GID=1337
COPY root /
RUN apk add --no-cache \
build-base \
python3-dev \
py3-pip \
git \
curl \
ffmpeg \
jpeg-dev \
file-dev \
postgresql-dev \
postgresql-client \
py3-pillow \
py3-tz \
py3-psycopg2 \
py3-redis \
youtube-dl \
py3-musicbrainzngs \
py3-markdown \
py3-raven \
py3-magic \
py3-cryptography \
su-exec \
s6 \
&& cd /opt/funkwhale \
&& pip3 install -r api/requirements.txt \
&& mkdir -p /opt/funkwhale/data/media \
&& mkdir -p /opt/funkwhale/front/dist/_protected \
&& ln -s /opt/funkwhale/data/media /opt/funkwhale/front/dist/_protected/media \
&& ln -s /opt/funkwhale/data/media /opt/funkwhale/front/dist/media \
&& ln -s /opt/funkwhale/data/static /opt/funkwhale/front/dist/staticfiles
CMD ["s6-svscan", "/etc/s6.d/"]
version: '2'
services:
funkwhale:
image: funkwhale
ports:
- 80:80
env_file: .env
links:
- postgres:postgres
- redis:redis
volumes:
- ./data:/opt/funkwhale/data
redis:
image: redis
postgres:
image: postgres
:80 {
root /opt/funkwhale/front/dist
internal /_protected/media
rewrite /rest/(.*) /api/subsonic/rest/{1}
proxy /api localhost:5000 {
transparent
}
proxy /federation localhost:5000 {
transparent
}
proxy /.well-known localhost:5000 {
transparent
}
log stdout
}
#!/bin/sh
exec su-exec ${UID}:${GID} caddy -conf /etc/caddy/Caddyfile
#!/bin/sh
cd /opt/funkwhale/api
chown -R ${UID}:${GID} ..
su-exec ${UID}:${GID} python3 manage.py migrate
su-exec ${UID}:${GID} python3 manage.py collectstatic --noinput
exec su-exec ${UID}:${GID} daphne -b 0.0.0.0 -p 5000 config.asgi:application --proxy-headers
#!/bin/sh
cd /opt/funkwhale/api
exec su-exec ${UID}:${GID} celery -A funkwhale_api.taskapp beat -l ${LOGLEVEL}
#!/bin/sh
cd /opt/funkwhale/api
exec su-exec ${UID}:${GID} celery -A funkwhale_api.taskapp worker -l ${LOGLEVEL}
......@@ -17,12 +17,16 @@
</template>
</div>
</div>
<div class="inline fields">
<div class="">
<div class="field">
<label for="name"><translate>Radio name</translate></label>
<input id="name" type="text" v-model="radioName" :placeholder="labels.placeholder" />
<input id="name" type="text" v-model="radioName" :placeholder="labels.placeholder.name" />
</div>
<div class="field">
<label for="description"><translate>Description</translate></label>
<textarea rows="2" id="description" type="text" v-model="radioDesc" :placeholder="labels.placeholder.description" />
</div>
<div class="inline field">
<input id="public" type="checkbox" v-model="isPublic" />
<label for="public"><translate>Display publicly</translate></label>
</div>
......@@ -113,6 +117,7 @@ export default {
filters: [],
checkResult: null,
radioName: '',
radioDesc: '',
isPublic: true
}
},
......@@ -164,6 +169,7 @@ export default {
}
})
self.radioName = response.data.name
self.radioDesc = response.data.description
self.isPublic = response.data.is_public
self.isLoading = false
})
......@@ -197,6 +203,7 @@ export default {
})
final = {
'name': this.radioName,
'description': this.radioDesc,
'is_public': this.isPublic,
'config': final
}
......@@ -224,7 +231,10 @@ export default {
computed: {
labels () {
let title = this.$gettext('Radio Builder')
let placeholder = this.$gettext('My awesome radio')
let placeholder = {
'name': this.$gettext('My awesome radio'),
'description': this.$gettext('My awesome description')
}
return {
title,
placeholder
......
......@@ -14,13 +14,14 @@
</div>
</div>
<div class="extra content">
<user-link :user="radio.user" class="left floated" />
<radio-button class="right floated button" :type="type" :custom-radio-id="customRadioId"></radio-button>
<router-link
class="ui basic yellow button"
v-if="$store.state.auth.authenticated && type === 'custom' && customRadio.user === $store.state.auth.profile.id"
class="ui basic yellow button right floated"
v-if="$store.state.auth.authenticated && type === 'custom' && radio.user.id === $store.state.auth.profile.id"
:to="{name: 'library.radios.edit', params: {id: customRadioId }}">
<translate>Edit...</translate>
</router-link>
<radio-button class="right floated button" :type="type" :custom-radio-id="customRadioId"></radio-button>
</div>
</div>
</template>
......