Skip to content
Snippets Groups Projects
Commit c8696beb authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Docker setup is officialy documented! ❤️

parent 9f264e38
No related branches found
No related tags found
No related merge requests found
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# workspace files are user-specific
*.sublime-workspace
# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project
# sftp configuration file
sftp-config.json
# Basics
*.py[cod]
__pycache__
# Logs
*.log
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
htmlcov
# Translations
*.mo
*.pot
# Pycharm
.idea
# Vim
*~
*.swp
*.swo
# npm
front/node_modules/
# Compass
.sass-cache
# virtual environments
.env
# User-uploaded media
funkwhale_api/media/
# Hitch directory
tests/.hitch
# MailHog binary
mailhog
*.sqlite3
music
media
version: '3'
services:
postgres:
restart: unless-stopped
env_file: .env
image: postgres:9.4
redis:
restart: unless-stopped
env_file: .env
image: redis:3
volumes:
- ./data:/data
celeryworker:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
command: python manage.py celery worker
links:
- postgres
- redis
environment:
- C_FORCE_ROOT=true
volumes:
- ./api/media:/app/funkwhale_api/media
celerybeat:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
command: celery -A funkwhale_api.taskapp beat -l INFO
links:
- postgres
- redis
api:
restart: unless-stopped
image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest}
env_file: .env
command: ./compose/django/gunicorn.sh
volumes:
- ./data/media:/app/funkwhale_api/media
- ./data/static:/app/staticfiles
ports:
- "${FUNKWHALE_API_IP:-127.0.0.1}:${FUNKWHALE_API_PORT:-5000}:5000"
links:
- postgres
- redis
# If you're tweaking this file from the template, ensure you edit at lest the
# following variables:
# - DJANGO_SECRET_KEY
# - DJANGO_ALLOWED_HOSTS
# Docker only
# -----------
# The tag of the image we should use
# (it will be interpolated in docker-compose file)
FUNKWHALE_VERSION=latest
# General configuration
# ---------------------
# Set this variables to bind the API server to another interface/port
# example: FUNKWHALE_API_IP=0.0.0.0
# example: FUNKWHALE_API_PORT=5678
FUNKWHALE_API_IP=
FUNKWHALE_API_PORT=
# API/Django configuration
# which settings module should django use?
# You don't have to touch this unless you really know what you're doing
DJANGO_SETTINGS_MODULE=config.settings.production
# Generate one using `openssl rand -base64 45`, for example
DJANGO_SECRET_KEY=
# You don't have to edit this
DJANGO_ADMIN_URL=^admin/
# Update it to match the domain that will be used to reach your funkwhale
# instance
# Example: DJANGO_ALLOWED_HOSTS=funkwhale.yourdomain.com
DJANGO_ALLOWED_HOSTS=yourdomain
# If True, unauthenticated users won't be able to query the API
API_AUTHENTICATION_REQUIRED=True
# What is the workflow for registration on funkwhale ? Possible values:
# public: anybody can register an account
# disabled: nobody can register an account
REGISTRATION_MODE=disabled
upstream funkwhale-api {
# depending on your setup, you may want to udpate this
server localhost:5000;
}
server {
listen 80;
server_name demo.funkwhale.audio;
root /srv/funkwhale/front/dist;
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
rewrite ^(.+)$ /index.html last;
}
location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
proxy_pass http://funkwhale-api/api/;
}
location /media/ {
alias /srv/funkwhale/data/media/;
}
location /staticfiles/ {
alias /srv/funkwhale/data/staticfiles/;
}
}
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