solved environment variable bug

This commit is contained in:
Kevin Veen-Birkenbach 2025-02-04 23:49:38 +01:00
parent 8083e2b51c
commit 01ae2c3b38
3 changed files with 30 additions and 23 deletions

View File

@ -14,30 +14,30 @@ services:
# flag: # flag:
# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4 # celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4
{% include 'roles/docker-compose/templates/services/base.yml.j2' %} {% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: funkwhale/api:${FUNKWHALE_VERSION} image: funkwhale/api:{{applications.funkwhale.version}}
command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency=${CELERYD_CONCURRENCY-0} command: celery -A funkwhale_api.taskapp worker -l INFO --concurrency={{celeryd_concurrency}}
environment: environment:
- C_FORCE_ROOT=true - C_FORCE_ROOT=true
volumes: volumes:
- "data:${MEDIA_ROOT}" - "data:{{media_root}}"
- "music:${MUSIC_DIRECTORY_PATH}:ro" - "music:{{music_directory_path}}:ro"
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %} {% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %} {% include 'templates/docker/container/networks.yml.j2' %}
celerybeat: celerybeat:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %} {% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: funkwhale/api:${FUNKWHALE_VERSION} image: funkwhale/api:{{applications.funkwhale.version}}
command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO command: celery -A funkwhale_api.taskapp beat --pidfile= -l INFO
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %} {% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
{% include 'templates/docker/container/networks.yml.j2' %} {% include 'templates/docker/container/networks.yml.j2' %}
api: api:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %} {% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: funkwhale/api:${FUNKWHALE_VERSION} image: funkwhale/api:{{applications.funkwhale.version}}
volumes: volumes:
- "music:${MUSIC_DIRECTORY_PATH}:ro" - "music:{{music_directory_path}}:ro"
- "data:${MEDIA_ROOT}" - "data:{{media_root}}"
- "static_root:${STATIC_ROOT}" - "static_root:{{static_root}}"
ports: ports:
- "5000" - "5000"
{% include 'templates/docker/container/depends-on-database-redis.yml.j2' %} {% include 'templates/docker/container/depends-on-database-redis.yml.j2' %}
@ -45,18 +45,18 @@ services:
front: front:
{% include 'roles/docker-compose/templates/services/base.yml.j2' %} {% include 'roles/docker-compose/templates/services/base.yml.j2' %}
image: funkwhale/front:${FUNKWHALE_VERSION} image: funkwhale/front:{{applications.funkwhale.version}}
depends_on: depends_on:
- api - api
environment: environment:
# Override those variables in your .env file if needed # Override those variables in your .env file if needed
- "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}" - "NGINX_MAX_BODY_SIZE=100M"
volumes: volumes:
- "data:${MEDIA_ROOT}:ro" - "data:{{media_root}}:ro"
#- "${STATIC_ROOT}:${STATIC_ROOT}:ro" #- "{{static_root}}:{{static_root}}:ro"
ports: ports:
# override those variables in your .env file if needed # override those variables in your .env file if needed
- "${FUNKWHALE_API_IP}:${FUNKWHALE_API_PORT}:80" - "127.0.0.1:{{http_port}}:80"
{% include 'templates/docker/container/networks.yml.j2' %} {% include 'templates/docker/container/networks.yml.j2' %}
typesense: typesense:

View File

@ -16,17 +16,23 @@
# #
# Docker only # Docker only
# ----------- # -----------
MUSIC_DIRECTORY_PATH=/music MUSIC_DIRECTORY_PATH={{music_directory_path}}
# Assuming that the following variable isn't used anymore.
# @todo remove it if this is true
FUNKWHALE_VERSION={{applications.funkwhale.version}} FUNKWHALE_VERSION={{applications.funkwhale.version}}
# End of docker-only configuration # End of docker-only configuration
# General configuration # General configuration
# --------------------- # ---------------------
# Assuming that the following variable isn't used anymore.
# @todo remove it if this is true
FUNKWHALE_API_IP=127.0.0.1 FUNKWHALE_API_IP=127.0.0.1
# Assuming that the following variable isn't used anymore.
# @todo remove it if this is true
FUNKWHALE_API_PORT={{http_port}} FUNKWHALE_API_PORT={{http_port}}
# The number of web workers to start in parallel. Higher means you can handle # The number of web workers to start in parallel. Higher means you can handle
# more concurrent requests, but also leads to higher CPU/Memory usage # more concurrent requests, but also leads to higher CPU/Memory usage
FUNKWHALE_WEB_WORKERS=4 FUNKWHALE_WEB_WORKERS=4
@ -74,17 +80,17 @@ REVERSE_PROXY_TYPE=nginx
# messaging). The more processes a worker gets, the more tasks # messaging). The more processes a worker gets, the more tasks
# can be processed in parallel. However, more processes also means # can be processed in parallel. However, more processes also means
# a bigger memory footprint. # a bigger memory footprint.
CELERYD_CONCURRENCY=1 CELERYD_CONCURRENCY={{celeryd_concurrency}}
# Where media files (such as album covers or audio tracks) should be stored # Where media files (such as album covers or audio tracks) should be stored
# on your system? # on your system?
# (Ensure this directory actually exists) # (Ensure this directory actually exists)
MEDIA_ROOT=/srv/funkwhale/data/ MEDIA_ROOT={{media_root}}
# Where static files (such as API css or icons) should be compiled # Where static files (such as API css or icons) should be compiled
# on your system? # on your system?
# (Ensure this directory actually exists) # (Ensure this directory actually exists)
STATIC_ROOT=/srv/funkwhale/data/static STATIC_ROOT={{static_root}}
# 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
@ -109,7 +115,4 @@ DJANGO_SECRET_KEY={{funkwhale_django_secret}}
FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/front/dist FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/front/dist
# Nginx related configuration
NGINX_MAX_BODY_SIZE=100M
DATABASE_URL = postgresql://{{database_username}}:{{database_password}}@{{database_host}}:{{database_port}}/{{ database_name }} DATABASE_URL = postgresql://{{database_username}}:{{database_password}}@{{database_host}}:{{database_port}}/{{ database_name }}

View File

@ -2,4 +2,8 @@ application_id: "funkwhale"
nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;" nginx_docker_reverse_proxy_extra_configuration: "client_max_body_size 512M;"
database_password: "{{funkwhale_database_password}}" database_password: "{{funkwhale_database_password}}"
database_type: "postgres" database_type: "postgres"
ldap_network_enabled: true # Activate LDAP network ldap_network_enabled: true # Activate LDAP network
media_root: "/srv/funkwhale/data/"
static_root: "{{media_root}}static"
celeryd_concurrency: 1
music_directory_path: "/music"