Removed some variables from celerybeat service and changed the network stack

master
Meliurwen 4 years ago
parent 92b1061fb6
commit 4a23db3e92
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 18
      .env.example
  2. 41
      all.env.example
  3. 40
      docker-compose.yml

@ -1,12 +1,17 @@
# Global Settings # Global Settings
TZ=Etc/UTC TZ=Etc/UTC
LOCAL_STACK_DIR=/srv/docker/volumes/funkwhale LOCAL_STACK_DIR=/srv/docker/volumes/funkwhale
HOST_MUSIC_DIRECTORY_SERVE_PATH=/srv/docker/volumes/funkwhale/media/import_music
HOST_MEDIA_ROOT=/srv/docker/volumes/funkwhale/media/media
HOST_STATIC_ROOT=/srv/docker/volumes/funkwhale/api/static
HOST_FUNKWHALE_FRONTEND_PATH=/srv/docker/volumes/funkwhale/api/front/dist
# Replace this by the definitive, public domain you will use for # Replace this by the definitive, public domain you will use for
# your instance. It cannot be changed after initial deployment # your instance. It cannot be changed after initial deployment
# without breaking your instance. # without breaking your instance.
FUNKWHALE_HOSTNAME= FUNKWHALE_HOSTNAME=
# Global Settings (optional) # Global Settings (optional)
# The tag of the image we should use
FUNKWHALE_VERSION= FUNKWHALE_VERSION=
# Networks # Networks
@ -30,12 +35,11 @@ WB_TAG=
WB_CONTAINER_NAME= WB_CONTAINER_NAME=
WB_RESTART= WB_RESTART=
# celeryworker (optional)
# Number of worker processes to execute. Defaults to 0, in which case it uses your number of CPUs
# Celery workers handle background tasks (such file imports or federation
# messaging). The more processes a worker gets, the more tasks
# can be processed in parallel. However, more processes also means
# a bigger memory footprint.
CELERYD_CONCURRENCY= CELERYD_CONCURRENCY=
MUSIC_DIRECTORY_PATH=/music
MUSIC_DIRECTORY_SERVE_PATH=/srv/docker/volumes/funkwhale/media/import_music
MEDIA_ROOT=/srv/docker/volumes/funkwhale/media/media
STATIC_ROOT=/srv/docker/volumes/funkwhale/api/static
FUNKWHALE_FRONTEND_PATH=/srv/docker/volumes/funkwhale/api/front/dist

@ -16,15 +16,6 @@
# - MUSIC_DIRECTORY_PATH and MUSIC_DIRECTORY_SERVE_PATH if you plan to use # - MUSIC_DIRECTORY_PATH and MUSIC_DIRECTORY_SERVE_PATH if you plan to use
# in-place import # in-place import
# #
# Docker only
# -----------
# The tag of the image we should use
# (it will be interpolated in docker-compose file)
# You can comment or ignore this if you're not using docker
FUNKWHALE_VERSION=latest
# End of Docker-only configuration
# General configuration # General configuration
# --------------------- # ---------------------
@ -88,23 +79,6 @@ REVERSE_PROXY_TYPE=nginx
# For the Celery/asynchronous tasks part: # For the Celery/asynchronous tasks part:
# CELERY_BROKER_URL=redis+socket:///run/redis/redis.sock?virtual_host=0 # CELERY_BROKER_URL=redis+socket:///run/redis/redis.sock?virtual_host=0
# Number of worker processes to execute. Defaults to 0, in which case it uses your number of CPUs
# Celery workers handle background tasks (such file imports or federation
# messaging). The more processes a worker gets, the more tasks
# can be processed in parallel. However, more processes also means
# a bigger memory footprint.
# CELERYD_CONCURRENCY=0
# Where media files (such as album covers or audio tracks) should be stored
# on your system?
# (Ensure this directory actually exists)
MEDIA_ROOT=/srv/docker/volumes/funkwhale/media/media
# Where static files (such as API css or icons) should be compiled
# on your system?
# (Ensure this directory actually exists)
STATIC_ROOT=/srv/docker/volumes/funkwhale/api/static
# which settings module should django use? # which settings module should django use?
# You don't have to touch this unless you really know what you're doing # You don't have to touch this unless you really know what you're doing
DJANGO_SETTINGS_MODULE=config.settings.production DJANGO_SETTINGS_MODULE=config.settings.production
@ -123,19 +97,6 @@ DJANGO_SECRET_KEY=
RAVEN_ENABLED=false RAVEN_ENABLED=false
RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:0062dc16a22b41679cd5765e5342f716@sentry.eliotberriot.com/5 RAVEN_DSN=https://44332e9fdd3d42879c7d35bf8562c6a4:0062dc16a22b41679cd5765e5342f716@sentry.eliotberriot.com/5
# In-place import settings
# You can safely leave those settings uncommented if you don't plan to use
# in place imports.
# Typical docker setup:
# MUSIC_DIRECTORY_PATH=/music # docker-only
# MUSIC_DIRECTORY_SERVE_PATH=/srv/docker/volumes/funkwhale/media/import_music
# Typical non-docker setup:
# MUSIC_DIRECTORY_PATH=/srv/docker/volumes/funkwhale/media/import_music
# # MUSIC_DIRECTORY_SERVE_PATH= # stays commented, not needed
MUSIC_DIRECTORY_PATH=/music
MUSIC_DIRECTORY_SERVE_PATH=/srv/docker/volumes/funkwhale/media/import_music
# LDAP settings # LDAP settings
# Use the following options to allow authentication on your Funkwhale instance # Use the following options to allow authentication on your Funkwhale instance
# using a LDAP directory. # using a LDAP directory.
@ -150,8 +111,6 @@ MUSIC_DIRECTORY_SERVE_PATH=/srv/docker/volumes/funkwhale/media/import_music
# LDAP_START_TLS=False # LDAP_START_TLS=False
# LDAP_ROOT_DN=dc=domain,dc=com # LDAP_ROOT_DN=dc=domain,dc=com
FUNKWHALE_FRONTEND_PATH=/srv/docker/volumes/funkwhale/api/front/dist
## External storages configuration ## External storages configuration
# Funkwhale can store uploaded files on Amazon S3 and S3-compatible storages (such as Minio) # Funkwhale can store uploaded files on Amazon S3 and S3-compatible storages (such as Minio)
# Uncomment and fill the variables below # Uncomment and fill the variables below

@ -28,9 +28,11 @@ services:
- postgres - postgres
- redis - redis
volumes: volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH}:/music:ro" - "${HOST_MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}" - "${HOST_MEDIA_ROOT}:/srv/wwww/media"
env_file: all.env env_file:
- all.env
- shared.env
environment: environment:
- C_FORCE_ROOT=true - C_FORCE_ROOT=true
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME} - FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME}
@ -50,9 +52,8 @@ services:
depends_on: depends_on:
- postgres - postgres
- redis - redis
env_file: all.env env_file:
environment: - all.env
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME}
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
api: api:
@ -62,13 +63,15 @@ services:
- postgres - postgres
- redis - redis
volumes: volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH}:/music:ro" - "${HOST_MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}" - "${HOST_MEDIA_ROOT}:/srv/wwww/media"
- "${STATIC_ROOT}:${STATIC_ROOT}" - "${HOST_STATIC_ROOT}:/srv/wwww/static"
- "${FUNKWHALE_FRONTEND_PATH}:/frontend" - "${HOST_FUNKWHALE_FRONTEND_PATH}:/frontend"
expose: expose:
- 5000 - 5000
env_file: all.env env_file:
- all.env
- shared.env
environment: environment:
- FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME} - FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME}
@ -76,15 +79,18 @@ services:
image: ${WB_IMG:-nginx}:${WB_TAG:-latest} image: ${WB_IMG:-nginx}:${WB_TAG:-latest}
container_name: ${WB_CONTAINER_NAME:-funkwhale-web} container_name: ${WB_CONTAINER_NAME:-funkwhale-web}
restart: ${WB_RESTART:-unless-stopped} restart: ${WB_RESTART:-unless-stopped}
networks:
- default
- main-webservices
depends_on: depends_on:
- api - api
volumes: volumes:
- "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro" - "./nginx/funkwhale.template:/etc/nginx/conf.d/funkwhale.template:ro"
- "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro" - "./nginx/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro"
- "${MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro" - "${HOST_MUSIC_DIRECTORY_SERVE_PATH}:/srv/wwww/music:ro"
- "${MEDIA_ROOT}:/srv/wwww/media:ro" - "${HOST_MEDIA_ROOT}:/srv/wwww/media:ro"
- "${STATIC_ROOT}:/srv/wwww/static:ro" - "${HOST_STATIC_ROOT}:/srv/wwww/static:ro"
- "${FUNKWHALE_FRONTEND_PATH}:/srv/wwww/frontend:ro" - "${HOST_FUNKWHALE_FRONTEND_PATH}:/srv/wwww/frontend:ro"
expose: expose:
- 80 - 80
env_file: env_file:
@ -98,7 +104,9 @@ services:
&& cat /etc/nginx/conf.d/default.conf && cat /etc/nginx/conf.d/default.conf
&& nginx -g 'daemon off;'" && nginx -g 'daemon off;'"
networks: networks:
default: default:
internal: true
main-webservices:
external: external:
name: ${NETWORK} name: ${NETWORK}

Loading…
Cancel
Save