Skip to content
Snippets Groups Projects
Commit 88f265c8 authored by Jan Christian Grünhage's avatar Jan Christian Grünhage
Browse files

all-in-one docker image

parent 52a96e29
No related branches found
No related tags found
No related merge requests found
Pipeline #1765 canceled with stages
Showing
with 105 additions and 0 deletions
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
#!/bin/sh
#!/bin/sh
exec su-exec ${UID}:${GID} caddy -conf /etc/caddy/Caddyfile
#!/bin/sh
#!/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
#!/bin/sh
cd /opt/funkwhale/api
exec su-exec ${UID}:${GID} celery -A funkwhale_api.taskapp beat -l ${LOGLEVEL}
#!/bin/sh
#!/bin/sh
cd /opt/funkwhale/api
exec su-exec ${UID}:${GID} celery -A funkwhale_api.taskapp worker -l ${LOGLEVEL}
api
front
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment