Cease supporting Docker deployments altogether

Other changes:
* Do not use Funkwhale's CI, GitPod, etc
* Support Taskfile.yml (might make future CI builds easier)

Signed-off-by: Shin'ya Minazuki <shinyoukai@laidback.moe>
This commit is contained in:
Shin'ya Minazuki 2026-01-28 10:04:25 -03:00
commit 11d92f33c8
28 changed files with 145 additions and 1642 deletions

View file

@ -1,69 +0,0 @@
### 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
api/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
api/funquail_api/media/
# Hitch directory
api/tests/.hitch
# MailHog binary
mailhog
*.sqlite3
api/music
api/media

View file

@ -1,515 +0,0 @@
---
include:
- project: funkwhale/ci
file: /templates/pre-commit.yml
- project: funkwhale/ci
file: /templates/lychee.yml
- project: funkwhale/ci
file: /templates/ssh-agent.yml
variables:
PYTHONDONTWRITEBYTECODE: "true"
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
YARN_CACHE_FOLDER: $CI_PROJECT_DIR/.cache/yarn
POETRY_VIRTUALENVS_IN_PROJECT: "true"
.shared_variables:
# Keep the git files permissions during job setup
keep_git_files_permissions: &keep_git_files_permissions
GIT_STRATEGY: clone
GIT_DEPTH: "5"
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: "true"
.shared_caches:
# Cache for front related jobs
front_cache: &front_cache
- key: front-yarn
paths: [$YARN_CACHE_FOLDER]
- key:
prefix: front-node_modules
files: [front/yarn.lock]
paths: [front/node_modules]
- key:
prefix: front-lint
files:
- front/.eslintcache
- front/tsconfig.tsbuildinfo
# Cache for api related jobs
# Include the python version to prevent loosing caches in the test matrix
api_cache: &api_cache
- key: api-pip-$PYTHON_VERSION
paths: [$PIP_CACHE_DIR]
- key:
prefix: api-venv-$PYTHON_VERSION
files: [api/poetry.lock]
paths: [api/.venv]
# Cache for docs related jobs
docs_cache: &docs_cache
- key: docs-pip
paths: [$PIP_CACHE_DIR]
- key:
prefix: docs-venv
files: [docs/poetry.lock]
paths: [docs/.venv]
default:
interruptible: true
tags:
- docker
workflow:
rules:
# Run for any event on the default branches in the funkwhale namespace
- if: >
$CI_PROJECT_NAMESPACE == "funkwhale" &&
(
$CI_COMMIT_BRANCH =~ /^(stable|develop)$/ ||
$CI_COMMIT_TAG
)
# Run for merge requests from any repo or branches
- if: $CI_MERGE_REQUEST_ID
stages:
- review
- lint
- test
- build
- publish
review_front:
allow_failure: true
stage: review
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
image: $CI_REGISTRY/funkwhale/ci/node-python:18
variables:
BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/
VUE_APP_ROUTER_BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/
VUE_APP_INSTANCE_URL: https://demo.funkwhale.audio
NODE_ENV: review
NODE_OPTIONS: --max-old-space-size=4096
environment:
name: review/front/$CI_COMMIT_REF_NAME
url: http://$CI_PROJECT_NAMESPACE.pages.funkwhale.audio/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/index.html
cache: *front_cache
before_script:
- mkdir front-review
- cd front
- yarn install --frozen-lockfile
script:
- yarn run build --base ./
- cp -r dist/* ../front-review
artifacts:
expire_in: 2 weeks
paths:
- front-review
review_docs:
allow_failure: true
stage: review
needs: []
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: [docs/**/*]
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-docs:3.11
environment:
name: review/docs/$CI_COMMIT_REF_NAME
url: http://$CI_PROJECT_NAMESPACE.pages.funkwhale.audio/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/docs-review/index.html
cache: *docs_cache
before_script:
- cd docs
- make install
script:
- make build BUILD_DIR=../docs-review
artifacts:
expire_in: 2 weeks
paths:
- docs-review
find_broken_links:
extends: [.lychee]
allow_failure:
exit_codes: 2
script:
- >
lychee
--cache
--no-progress
--exclude-all-private
--exclude-mail
--exclude 'demo\.funkwhale\.audio'
--exclude 'nginx\.com'
--exclude-path 'docs/_templates/'
-- . || exit $?
require_changelog:
stage: lint
rules:
# Don't run on merge request that mention NOCHANGELOG or renovate bot commits
- if: >
$CI_MERGE_REQUEST_TITLE =~ /NOCHANGELOG/ ||
$CI_COMMIT_AUTHOR == "Renovate Bot <bot@dev.funkwhale.audio>"
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
image: python:3.11
script:
- git diff --name-only $CI_MERGE_REQUEST_DIFF_BASE_SHA..$CI_COMMIT_SHA | grep "changes/changelog.d/*"
pre-commit:
extends: [.pre-commit]
lint_api:
allow_failure: true
stage: lint
needs: []
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [api/**/*]
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-api:3.11
before_script:
- cd api
- make install
script:
- make lint
lint_front:
stage: lint
needs: []
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18
cache: *front_cache
before_script:
- cd front
- yarn install --frozen-lockfile
script:
- yarn lint --max-warnings 0
- yarn lint:tsc
test_scripts:
stage: test
needs: []
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [scripts/**/*]
image: $CI_REGISTRY/funkwhale/ci/python:3.11
cache:
- key: scripts-pip
paths: [$PIP_CACHE_DIR]
- key:
prefix: scripts-venv
files: [scripts/poetry.lock]
paths: [scripts/.venv]
before_script:
- cd scripts
- make install
script:
- make test
test_api:
retry: 1
stage: test
needs:
- job: lint_api
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [api/**/*]
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-api:$PYTHON_VERSION
parallel:
matrix:
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11"]
services:
- name: postgres:15-alpine
command:
- --fsync=off
- --full_page_writes=off
- --synchronous_commit=off
- name: redis:7-alpine
cache: *api_cache
variables:
DATABASE_URL: "postgresql://postgres@postgres/postgres"
FUNKWHALE_URL: "https://funkwhale.ci"
DJANGO_SETTINGS_MODULE: config.settings.local
POSTGRES_HOST_AUTH_METHOD: trust
CACHE_URL: "redis://redis:6379/0"
before_script:
- cd api
- poetry env info
- poetry run pip install "setuptools==60.10.0" wheel
- poetry run pip install --no-use-pep517 django-allauth==0.42.0
- poetry install --all-extras
script:
- >
poetry run pytest
--junitxml=report.xml
--cov
--cov-config=pyproject.toml
--cov-report=term-missing:skip-covered
--cov-report=xml
tests
artifacts:
expire_in: 2 weeks
reports:
junit: api/report.xml
coverage_report:
coverage_format: cobertura
path: api/coverage.xml
coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/'
test_front:
stage: test
needs:
- job: lint_front
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18
cache: *front_cache
before_script:
- cd front
- yarn install --frozen-lockfile
script:
- yarn test:unit
artifacts:
reports:
junit: front/test_results.xml
coverage_report:
coverage_format: cobertura
path: front/coverage/cobertura-coverage.xml
build_metadata:
stage: build
image: $CI_REGISTRY/funkwhale/ci/python:3.11
variables:
GIT_FETCH_EXTRA_FLAGS: --prune
script:
- make build-metadata
- make docker-metadata
artifacts:
reports:
dotenv: build_metadata.env
paths:
- docker-bake.json
- docker-bake.api.json
- docker-bake.front.json
test_integration:
stage: test
rules:
- if: $RUN_CYPRESS
interruptible: true
image:
name: cypress/included:12.14.0
entrypoint: [""]
cache:
- *front_cache
- key:
paths:
- /root/.cache/Cypress
before_script:
- cd front
- yarn install
script:
- yarn run cypress run
build_api_schema:
stage: build
needs:
- job: test_api
optional: true
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [api/**/*]
# Add build_docs rules because it depends on the build_api_schema artifact
- changes: [docs/**/*]
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-api:3.11
services:
- postgres:15-alpine
- redis:7-alpine
cache: *api_cache
variables:
DATABASE_URL: "postgresql://postgres@postgres/postgres"
FUNKWHALE_URL: "https://funkwhale.ci"
DJANGO_SETTINGS_MODULE: config.settings.local
POSTGRES_HOST_AUTH_METHOD: trust
CACHE_URL: "redis://redis:6379/0"
API_TYPE: "v1"
before_script:
- cd api
- poetry run pip install "setuptools==60.10.0" wheel
- poetry run pip install --no-use-pep517 django-allauth==0.42.0
- poetry install --all-extras
- poetry run funkwhale-manage migrate
script:
- poetry run funkwhale-manage spectacular --file ../docs/schema.yml
artifacts:
expire_in: 2 weeks
paths:
- docs/schema.yml
build_docs:
stage: build
needs:
- job: build_api_schema
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [docs/**/*]
image: $CI_REGISTRY/funkwhale/ci/python-funkwhale-docs:3.11
cache: *docs_cache
before_script:
- cd docs
- make install
script:
- make build-all BUILD_DIR=../public
artifacts:
expire_in: 2 weeks
paths:
- public
build_front:
stage: build
needs:
# The test_front job is currently disabled
# - job: test_front
- job: lint_front
optional: true
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [front/**/*]
image: $CI_REGISTRY/funkwhale/ci/node-python:18
variables:
<<: *keep_git_files_permissions
NODE_OPTIONS: --max-old-space-size=4096
cache: *front_cache
before_script:
- cd front
- yarn install --frozen-lockfile
script:
- yarn run build:deployment
artifacts:
name: front_${CI_COMMIT_REF_NAME}
paths:
- front/dist
build_api:
stage: build
needs:
- job: test_api
optional: true
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
- changes: [api/**/*]
image: $CI_REGISTRY/funkwhale/ci/python:3.11
variables:
<<: *keep_git_files_permissions
script:
- rm -rf api/tests
- >
if [[ -z "$CI_COMMIT_TAG" ]]; then
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
fi
artifacts:
name: api_${CI_COMMIT_REF_NAME}
paths:
- api
deploy_docs:
interruptible: false
extends: .ssh-agent
stage: publish
needs:
- job: build_docs
artifacts: true
rules:
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
image: $CI_REGISTRY/funkwhale/ci/python:3.11
variables:
GIT_STRATEGY: none
script:
- rsync -r --delete -e "ssh -p 2282" $CI_PROJECT_DIR/public/ docs@docs.funkwhale.audio:/htdocs/$CI_COMMIT_REF_NAME
docker:
interruptible: false
tags: [docker, privileged, multiarch]
stage: build
needs:
- job: build_metadata
artifacts: true
- job: test_api
optional: true
- job: test_front
optional: true
rules:
- if: $CI_COMMIT_TAG
variables:
BUILD_ARGS: >
--set *.platform=linux/amd64,linux/arm64
--no-cache
--push
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
variables:
BUILD_ARGS: >
--set *.platform=linux/amd64,linux/arm64
--set *.cache-from=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_COMMIT_BRANCH,oci-mediatypes=false
--set *.cache-to=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_COMMIT_BRANCH,mode=max,oci-mediatypes=false
--push
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
BUILD_ARGS: >
--set *.platform=linux/amd64
--set *.cache-from=type=registry,ref=$DOCKER_CACHE_IMAGE:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME,oci-mediatypes=false
image: $CI_REGISTRY/funkwhale/ci/docker:20
services:
- docker:20-dind
variables:
<<: *keep_git_files_permissions
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
BUILDKIT_PROGRESS: plain
DOCKER_CACHE_IMAGE: $CI_REGISTRY/funkwhale/funkwhale/cache
before_script:
- >
echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY";
if [[ "$BUILD_ARGS" =~ "--push" ]]; then
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_LOGIN" --password-stdin docker.io;
fi
script:
- >
if [[ -z "$CI_COMMIT_TAG" ]]; then
./scripts/set-api-build-metadata.sh $CI_COMMIT_SHORT_SHA;
fi
- docker buildx create --use
- make docker-build BUILD_ARGS="--metadata-file metadata.json $BUILD_ARGS"
- cat metadata.json
artifacts:
name: docker_metadata_${CI_COMMIT_REF_NAME}
paths:
- metadata.json

View file

@ -1,52 +0,0 @@
<!--
Hi there! You are reporting a bug on this project, and we want to thank you!
If it's the first time you post here, please take a moment to read our Code of Conduct
(https://funkwhale.audio/code-of-conduct/) and ensure your issue respect our guidelines.
To ensure your bug report is as useful as possible, please try to stick
to the following structure. You can leave the parts text between `<!- ->`
markers untouched, they won't be displayed in your final message.
Please do not edit the following line, it's used for automatic classification
-->
/label ~"Type: Bug" ~"Status: Need triage"
## Steps to reproduce
<!--
Describe the steps to reproduce the issue, like:
1. Visit the page at /artists/
2. Type that
3. Submit
-->
## What happens?
<!--
Describe what happens once the previous steps are completed.
-->
## What is expected?
<!--
Describe the expected behaviour.
-->
## Context
<!--
The version of your instance can be found on the footer : Source code (x.y)
-->
**FunQuail version(s) affected**: x.y
<!--
If relevant, share additional context here like:
- Browser type and version (for front-end bugs)
- Instance configuration (Docker/non-docker, nginx/apache as proxy, etc.)
- Error messages, screenshots and logs
-->

View file

@ -1,26 +0,0 @@
<!--
Hello and welcome to our issue tracker! We appreciate you taking the time to help us make Funkwhale even better :smile:
Before you begin, here are some helpful tips for submitting an issue:
* If you need help setting up or using Funkwhale, try asking in our
[forum's support board](https://forum.funkwhale.audio/support) or our [support
chat room](https://riot.im/app/#/room/#funkwhale-support:tchncs.de).
* If you think you've found a bug but aren't sure, you can ask in one of the above channels
first. Once you're confident it's a bug, go ahead and create an issue for us to investigate.
Select the **Bug** template in the **Description** dropdown menu. This template contains
helpful tips for creating your report.
* For smaller additions and enhancements, please file a feature request.
Select the **Feature Request** template in the **Description** dropdown
menu. This template contains helpful tips for creating your request.
* If you have ideas for new features or use cases, consider opening a thread in our
[forum](https://forum.funkwhale.audio/t/development). This enables us to
discuss the feature, its use cases, and the development effort it requires.
We always like hearing ideas from our community. If you're still not sure, click
the **Create issue** button and we'll work with you to sort out the issue.
Happy listening! :whale:
-->

View file

@ -1,43 +0,0 @@
<!--
Hi there! You are about to share feature request or an idea, and we want to thank you!
If it's the first time you post here, please take a moment to read our Code of Conduct
(https://funkwhale.audio/code-of-conduct/) and ensure your issue respect our guidelines.
To ensure we can deal with your idea or request, please try to stick
to the following structure. You can leave the parts text between `<!- ->`
markers untouched, they won't be displayed in your final message.
Please do not edit the following line, it's used for automatic classification
-->
/label ~"Type: New feature" ~"Status: Need triage"
## What is the problem you are facing?
<!--
Describe the problem you'd like to solve, and why we need to add or
improve something in the current system to solve that problem.
Be as specific as possible.
-->
## What are the possible drawbacks or issues with the requested changes?
<!--
Altering the system behaviour is not always a free action, and it can impact
user experience, performance, introduce bugs or complexity, etc..
If you think about anything we should keep in mind while
examining your request, please describe it in this section.
-->
## Context
<!--
If relevant, share additional context here like:
- Links to existing implementations or examples of the requested feature
- Screenshots
-->

View file

@ -1,11 +0,0 @@
Please avoid merging the base branch into your feature branch. We are working with rebases and those merged tend to cause trouble.
For further questions, join us at Matrix: https://matrix.to/#/#funkwhale-dev:matrix.org
If your contribution is fixing an issue by a small change, please consider a merge into `stable` by using it as target branch.
Related issue: #XXX <!-- it's okay to have no issue for small changes -->
This Merge Request includes:
- [ ] Tests
- [ ] A changelog fragment (cf https://docs.funkwhale.audio/contributing.html#changelog-management)

View file

@ -1,73 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
":dependencyDashboard",
":maintainLockFilesWeekly",
":enablePreCommit",
":semanticCommits",
":semanticCommitScopeDisabled",
"group:monorepos",
"group:recommended"
],
"baseBranches": ["stable", "develop"],
"branchConcurrentLimit": 2,
"prConcurrentLimit": 1,
"rangeStrategy": "pin",
"ignoreDeps": ["$CI_REGISTRY/funkwhale/backend-test-docker"],
"packageRules": [
{
"matchPaths": ["api/*", "front/*", "docs/*"],
"additionalBranchPrefix": "{{parentDir}}-",
"semanticCommitScope": "{{parentDir}}"
},
{
"matchUpdateTypes": ["lockFileMaintenance"],
"branchConcurrentLimit": 0,
"prConcurrentLimit": 0
},
{
"matchUpdateTypes": ["major", "minor"],
"matchBaseBranches": ["stable"],
"enabled": false
},
{
"matchDepTypes": ["devDependencies"],
"matchBaseBranches": ["stable"],
"enabled": false
},
{
"matchManagers": ["npm"],
"addLabels": ["Area::Frontend"]
},
{
"matchManagers": ["poetry"],
"addLabels": ["Area::Backend"]
},
{
"matchPackagePatterns": ["^@vueuse/.*"],
"groupName": "vueuse"
},
{
"matchPackageNames": ["channels", "channels-redis", "daphne"],
"groupName": "channels"
},
{
"matchPackageNames": ["node"],
"allowedVersions": "/\\d+[02468]$/"
},
{
"matchFiles": ["deploy/docker-compose.yml"],
"matchPackageNames": ["postgres"],
"postUpgradeTasks": {
"commands": [
"echo 'Upgrade Postgres to version {{ newVersion }}. [Make sure to migrate!](https://docs.funkwhale.audio/administrator_documentation/upgrade_docs/docker.html#upgrade-the-postgres-container)' > changes/changelog.d/postgres.update"
],
"fileFilters": ["changes/changelog.d/postgres.update"]
}
},
{
"matchPackageNames": ["python"],
"rangeStrategy": "widen"
}
]
}

View file

@ -1,121 +0,0 @@
image:
file: .gitpod/Dockerfile
tasks:
- name: Backend
env:
ENV_FILE: /workspace/funquail/.gitpod/.env
COMPOSE_FILE: /workspace/funquail/.gitpod/docker-compose.yml
before: |
cp .gitpod/gitpod.env .gitpod/.env
cd api
init: |
mkdir -p ../data/media/attachments ../data/music ../data/staticfiles
docker-compose up -d
poetry env use python
poetry install
gp ports await 5432
poetry run funquail-manage migrate
poetry run funquail-manage fw users create --superuser --username gitpod --password funquail --email test@example.org
poetry run funquail-manage gitpod init
command: |
echo "MEDIA_URL=`gp url 8000`/media/" >> ../.gitpod/.env
echo "STATIC_URL=`gp url 8000`/staticfiles/" >> ../.gitpod/.env
echo "FUNKWHALE_HOSTNAME=`gp url 8000 | sed 's#https://##'`" >> ../.gitpod/.env
echo "FUNKWHALE_PROTOCOL=https" >> ../.gitpod/.env
docker-compose up -d
gp ports await 5432
poetry run funquail-manage collectstatic --no-input
poetry run funquail-manage gitpod dev
- name: Celery Worker
env:
ENV_FILE: /workspace/funquail/.gitpod/.env
before: cd api
command: |
gp ports await 5000
poetry run celery -A funquail_api.taskapp worker -l debug -B --concurrency=0
- name: Frontend
env:
VUE_EDITOR: code
before: cd front
init: |
yarn install
command: yarn dev --host 0.0.0.0 --base ./
- name: Documentation
before: cd docs
init: make install
command: make dev
- name: Welcome to FunQuail development!
env:
COMPOSE_FILE: /workspace/funquail/.gitpod/docker-compose.yml
ENV_FILE: /workspace/funquail/.gitpod/.env
VUE_EDITOR: code
DJANGO_SETTINGS_MODULE: config.settings.local
init: |
pre-commit install
pre-commit run --all
command: |
echo ""
echo -e " You can now start developing FunQuail with gitpod!"
echo -e " "
echo -e " To sign in to the superuser account,"
echo -e " please use these credentials:"
echo -e " "
echo -e " gitpod\u1b[0m:\u1b[34mfunquail"
echo ""
ports:
- name: FunQuail
port: 8000
visibility: public
onOpen: notify
- name: FunQuail API
port: 5000
visibility: private
onOpen: ignore
- name: PostgreSQL
port: 5432
visibility: private
onOpen: ignore
- name: Debugpy
port: 5678
visibility: private
onOpen: ignore
- name: Redis
port: 6379
visibility: private
onOpen: ignore
- name: Frontend
port: 8080
visibility: private
onOpen: ignore
- name: Documentation
port: 8001
visibility: public
onOpen: notify
vscode:
extensions:
- Vue.volar
- ms-python.python
- ms-toolsai.jupyter
- ms-toolsai.jupyter-keymap
- ms-toolsai.jupyter-renderers
- hbenl.vscode-test-explorer
- hbenl.test-adapter-converter
- littlefoxteam.vscode-python-test-adapter
- ZixuanChen.vitest-explorer

View file

@ -1,11 +0,0 @@
FROM gitpod/workspace-full:2023-10-25-20-43-33
USER gitpod
RUN sudo apt update -y \
&& sudo apt install libsasl2-dev libldap2-dev libssl-dev ffmpeg gettext -y
RUN pyenv install 3.11 && pyenv global 3.11
RUN pip install poetry pre-commit jinja2 towncrier \
&& poetry config virtualenvs.create true \
&& poetry config virtualenvs.in-project true

View file

@ -1,43 +0,0 @@
version: "3"
services:
postgres:
image: postgres:15-alpine
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
volumes:
- "../data/postgres:/var/lib/postgresql/data"
ports:
- 5432:5432
redis:
image: redis:7-alpine
volumes:
- "../data/redis:/data"
ports:
- 6379:6379
nginx:
env_file:
- ./.env
image: nginx
ports:
- 8000:80
extra_hosts:
- host.docker.internal:host-gateway
environment:
- "NGINX_MAX_BODY_SIZE=100M"
- "FUNQUAIL_API_IP=host.docker.internal"
- "FUNQUAIL_API_HOST=host.docker.internal"
- "FUNQUAIL_API_PORT=5000"
- "FUNQUAIL_FRONT_IP=host.docker.internal"
- "FUNQUAIL_FRONT_PORT=8080"
- "FUNQUAIL_HOSTNAME=${FUNKWHALE_HOSTNAME-host.docker.internal}"
- "FUNQUAIL_PROTOCOL=https"
volumes:
- ../data/media:/workspace/funquail/data/media:ro
- ../data/music:/music:ro
- ../data/staticfiles:/usr/share/nginx/html/staticfiles/:ro
- ../deploy/funquail_proxy.conf:/etc/nginx/funquail_proxy.conf:ro
- ../docker/nginx/conf.dev:/etc/nginx/templates/default.conf.template:ro
- ../front:/frontend:ro

View file

@ -1,26 +0,0 @@
# Dev Environment Variables
DJANGO_ALLOWED_HOSTS=.funquail.test,localhost,nginx,0.0.0.0,127.0.0.1,.gitpod.io
DJANGO_SETTINGS_MODULE=config.settings.local
C_FORCE_ROOT=true
BROWSABLE_API_ENABLED=True
FORWARDED_PROTO=http
LDAP_ENABLED=False
FUNQUAIL_SPA_HTML_ROOT=http://localhost:8000/
FUNQUAIL_URL=http://localhost:8000/
MUSIC_DIRECTORY_PATH=/workspace/funquail/data/music
STATIC_ROOT=/workspace/funquail/data/staticfiles/
MEDIA_ROOT=/workspace/funquail/data/media/
PYTHONTRACEMALLOC=0
PYTHONDONTWRITEBYTECODE=true
POSTGRES_VERSION=14
DEBUG=true
# Django Environment Variables
DATABASE_URL=postgresql://postgres@localhost:5432/postgres
DJANGO_SECRET_KEY=gitpod
THROTTLING_ENABLED=False
# Gitpod Environment Variables

View file

@ -1,85 +0,0 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: destroyed-symlinks
- id: check-json
- id: check-yaml
- id: check-xml
- id: check-toml
- id: check-vcs-permalinks
- id: check-merge-conflict
- id: end-of-file-fixer
exclude: ^(docs/locales/.*/LC_MESSAGES)
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/python-poetry/poetry
rev: 1.5.1
hooks:
- id: poetry-check
files: ^api/pyproject.toml$
args: [--directory=api]
- id: poetry-lock
files: ^api/pyproject.toml$
args: [--directory=api, --check]
- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
hooks:
- id: pyupgrade
args: [--py38-plus]
exclude: ^(api/.*/migrations/.*)
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
files: \.(md|yml|yaml|json)$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
- repo: local
hooks:
- id: pwa-manifest.json
name: pwa-manifest.json
description: Sync pwa-manifest.json
entry: scripts/sync-pwa-manifest.sh
pass_filenames: false
language: script
files: pwa-manifest.json$

36
Taskfile.yml Normal file
View file

@ -0,0 +1,36 @@
# https://taskfile.dev
version: '3'
vars:
BUILD_DIR: build
TASK_LIST: task -l
tasks:
default:
cmds:
- echo "See all available tasks with {{.TASK_LIST}}"
silent: true
install:
desc: Install required dependencies
cmds:
- poetry install
changelog:
desc: Generate a changelog
cmds:
- poetry run towncrier
dist:
desc: Build tarballs for backend and frontend
cmds:
- task: dist-be
- task: dist-fe
dist-be:
internal: true
cmds:
- rm -rf {{.BUILD_DIR}}
- mkdir -p {{.BUILD_DIR}}
- tar czvf {{.BUILD_DIR}}/funquail-be-{{.VERSION}}.tar.gz --owner prometheus --group prometheus --exclude-vcs api/
dist-fe:
internal: true
cmds:
- tar czvf {{.BUILD_DIR}}/funquail-fe-{{.VERSION}}.tar.gz --owner prometheus --group prometheus --exclude-vcs front/dist

19
api/Taskfile.yml Normal file
View file

@ -0,0 +1,19 @@
# https://taskfile.dev
version: '3'
vars:
TASK_LIST: task -l
tasks:
default:
cmds:
- echo "See all available tasks with {{.TASK_LIST}}"
silent: true
install:
desc: Install required dependencies
cmds:
- poetry install
lint:
desc: Format source code
cmds:
- poetry run pylint --recursive=true config funkwhale_api tests

View file

@ -1,105 +0,0 @@
version: "3"
services:
postgres:
restart: unless-stopped
env_file: .env
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
image: postgres:15-alpine
volumes:
- ./data/postgres:/var/lib/postgresql/data
redis:
restart: unless-stopped
env_file: .env
image: redis:7-alpine
volumes:
- ./data/redis:/data
celeryworker:
restart: unless-stopped
image: funquail/api:${FUNQUAIL_VERSION:-latest}
depends_on:
- postgres
- redis
env_file: .env
# 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.
# By default, a worker will span a number of process equal to your number
# of CPUs. You can adjust this, by explicitly setting the --concurrency
# flag:
# celery -A funquail_api.taskapp worker -l INFO --concurrency=4
command:
- celery
- --app=funquail_api.taskapp
- worker
- --loglevel=INFO
- --concurrency=${CELERYD_CONCURRENCY-0}
environment:
- C_FORCE_ROOT=true
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funquail/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
celerybeat:
restart: unless-stopped
image: funquail/api:${FUNQUAIL_VERSION:-latest}
command:
- celery
- --app=funquail_api.taskapp
- beat
- --loglevel=INFO
depends_on:
- postgres
- redis
env_file: .env
api:
restart: unless-stopped
image: funquail/api:${FUNQUAIL_VERSION:-latest}
depends_on:
- postgres
- redis
env_file: .env
volumes:
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funquail/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}"
- "${STATIC_ROOT}:${STATIC_ROOT}"
front:
restart: unless-stopped
image: funquail/front:${FUNQUAIL_VERSION:-latest}
depends_on:
- api
env_file:
- .env
environment:
# Override those variables in your .env file if needed
- "NGINX_MAX_BODY_SIZE=${NGINX_MAX_BODY_SIZE-100M}"
volumes:
# Uncomment if you want to use your previous nginx config, please let us
# know what special configuration you need, so we can support it with out
# upstream nginx configuration!
#- "./nginx/funquail.template:/etc/nginx/templates/default.conf.template:ro"
#- "./nginx/funquail_proxy.conf:/etc/nginx/funquail_proxy.conf:ro"
- "${MUSIC_DIRECTORY_SERVE_PATH-/srv/funquail/data/music}:${MUSIC_DIRECTORY_PATH-/music}:ro"
- "${MEDIA_ROOT}:${MEDIA_ROOT}:ro"
- "${STATIC_ROOT}:/usr/share/nginx/html/staticfiles:ro"
ports:
# override those variables in your .env file if needed
- "${FUNQUAIL_API_IP}:${FUNQUAIL_API_PORT}:80"
typesense:
restart: unless-stopped
env_file:
- .env
image: typesense/typesense:0.24.0
volumes:
- ./typesense/data:/data
command: --data-dir /data --enable-cors
profiles:
- typesense

View file

@ -1 +0,0 @@
../docker/nginx/conf.dev

View file

@ -1 +0,0 @@
../front/docker/funkwhale_proxy.conf

View file

@ -1 +0,0 @@
../front/docker/funkwhale.conf.template

View file

@ -1,85 +0,0 @@
upstream fw {
server ${FUNQUAIL_API_IP}:${FUNQUAIL_API_PORT};
}
# Required for websocket support.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
# update this to match your instance name
server_name ${FUNQUAIL_HOSTNAME};
# useful for Let's Encrypt
location /.well-known/acme-challenge/ {
allow all;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ${FUNQUAIL_HOSTNAME};
# TLS
# Feel free to use your own configuration for SSL here or simply remove the
# lines and move the configuration to the previous server block if you
# don't want to run funquail behind https (this is not recommended)
# have a look here for let's encrypt configuration:
# https://certbot.eff.org/all-instructions/#debian-9-stretch-nginx
ssl_protocols TLSv1.2;
ssl_ciphers HIGH:!MEDIUM:!LOW:!aNULL:!NULL:!SHA;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_certificate /etc/letsencrypt/live/${FUNQUAIL_HOSTNAME}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${FUNQUAIL_HOSTNAME}/privkey.pem;
# HSTS
add_header Strict-Transport-Security "max-age=31536000";
# General configs
client_max_body_size ${NGINX_MAX_BODY_SIZE};
charset utf-8;
# compression settings
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/javascript
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
# end of compression settings
location / {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://fw;
}
}

View file

@ -1,17 +0,0 @@
{
"group": {
"default": {
"targets": ["api", "front"]
}
},
"target": {
"api": {
"context": "api",
"target": "production"
},
"front": {
"context": "front",
"target": "production"
}
}
}

View file

@ -1,167 +0,0 @@
upstream funquail-api {
# depending on your setup, you may want to update this
server ${FUNQUAIL_API_HOST}:${FUNQUAIL_API_PORT};
}
upstream funquail-front {
server ${FUNQUAIL_FRONT_IP}:${FUNQUAIL_FRONT_PORT};
}
# Required for websocket support.
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
listen [::]:80;
server_name _;
# General configs
root /usr/share/nginx/html;
client_max_body_size ${NGINX_MAX_BODY_SIZE};
charset utf-8;
# compression settings
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/javascript
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
# end of compression settings
# headers
add_header Content-Security-Policy "default-src 'self'; connect-src https: wss: http: ws: 'self' 'unsafe-eval'; script-src 'self' 'wasm-unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; media-src https: http: 'self' data:; object-src 'none'";
add_header Referrer-Policy "strict-origin-when-cross-origin";
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Service-Worker-Allowed "/";
location /api/ {
include /etc/nginx/funquail_proxy.conf;
# This is needed if you have file import via upload enabled.
client_max_body_size ${NGINX_MAX_BODY_SIZE};
proxy_pass http://funquail-api;
}
location ~ ^/library/(albums|tracks|artists|playlists)/ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
location /channels/ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
location ~ ^/@(vite-plugin-pwa|vite|id)/ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-front;
}
location /@ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
location / {
expires 1d;
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-front;
}
location = /embed.html {
proxy_pass http://funquail-front;
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
add_header Referrer-Policy "strict-origin-when-cross-origin";
expires 1d;
}
location /federation/ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
# You can comment this if you do not plan to use the Subsonic API.
location /rest/ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api/api/subsonic/rest/;
}
location /.well-known/ {
include /etc/nginx/funquail_proxy.conf;
proxy_pass http://funquail-api;
}
# Allow direct access to only specific subdirectories in /media
location /media/__sized__/ {
alias ${MEDIA_ROOT}/__sized__/;
add_header Access-Control-Allow-Origin '*';
}
# Allow direct access to only specific subdirectories in /media
location /media/attachments/ {
alias ${MEDIA_ROOT}/attachments/;
add_header Access-Control-Allow-Origin '*';
}
# Allow direct access to only specific subdirectories in /media
location /media/dynamic_preferences/ {
alias ${MEDIA_ROOT}/dynamic_preferences/;
add_header Access-Control-Allow-Origin '*';
}
# This is an internal location that is used to serve
# media (uploaded) files once correct permission / authentication
# has been checked on API side.
# Comment the "NON-S3" commented lines and uncomment "S3" commented lines
# if you're storing media files in a S3 bucket.
location ~ /_protected/media/(.+) {
internal;
alias ${MEDIA_ROOT}/$1; # NON-S3
# Needed to ensure DSub auth isn't forwarded to S3/Minio, see #932.
# proxy_set_header Authorization ""; # S3
# proxy_pass $1; # S3
add_header Access-Control-Allow-Origin '*';
}
location /_protected/music/ {
# This is an internal location that is used to serve
# local music files once correct permission / authentication
# has been checked on API side.
# Set this to the same value as your MUSIC_DIRECTORY_PATH setting.
internal;
alias ${MUSIC_DIRECTORY_PATH}/;
add_header Access-Control-Allow-Origin '*';
}
location /manifest.json {
# If the reverse proxy is terminating SSL, nginx gets confused and redirects to http, hence the full URL
return 302 ${FUNQUAIL_PROTOCOL}://${FUNQUAIL_HOSTNAME}/api/v1/instance/spa-manifest.json;
}
location /staticfiles/ {
alias /usr/share/nginx/html/staticfiles/;
}
}

View file

@ -1,88 +0,0 @@
# cf https://stackoverflow.com/questions/10175812/how-to-create-a-self-signed-certificate-with-openssl/27931596#27931596
# create with openssl req -config openssl.conf -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout test.key -days 365 -out test.crt
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
# The Subject DN can be formed using X501 or RFC 4514 (see RFC 4519 for a description).
# Its sort of a mashup. For example, RFC 4514 does not provide emailAddress.
[ subject ]
countryName = Country Name (2 letter code)
countryName_default = US
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = NY
localityName = Locality Name (eg, city)
localityName_default = New York
organizationName = Organization Name (eg, company)
organizationName_default = Example, LLC
# Use a friendly name here because it's presented to the user. The server's DNS
# names are placed in Subject Alternate Names. Plus, DNS names here is deprecated
# by both IETF and CA/Browser Forums. If you place a DNS name here, then you
# must include the DNS name in the SAN too (otherwise, Chrome and others that
# strictly follow the CA/Browser Baseline Requirements will fail).
commonName = Common Name (e.g. server FQDN or YOUR name)
commonName_default = Example Company
emailAddress = Email Address
emailAddress_default = test@example.com
# Section x509_ext is used when generating a self-signed certificate. I.e., openssl req -x509 ...
[ x509_ext ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer
# You only need digitalSignature below. *If* you don't allow
# RSA Key transport (i.e., you use ephemeral cipher suites), then
# omit keyEncipherment because that's key transport.
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
subjectAltName = @alternate_names
nsComment = "OpenSSL Generated Certificate"
# RFC 5280, Section 4.2.1.12 makes EKU optional
# CA/Browser Baseline Requirements, Appendix (B)(3)(G) makes me confused
# In either case, you probably only need serverAuth.
# extendedKeyUsage = serverAuth, clientAuth
# Section req_ext is used when generating a certificate signing request. I.e., openssl req ...
[ req_ext ]
subjectKeyIdentifier = hash
basicConstraints = CA:FALSE
keyUsage = digitalSignature, keyEncipherment
subjectAltName = @alternate_names
nsComment = "OpenSSL Generated Certificate"
# RFC 5280, Section 4.2.1.12 makes EKU optional
# CA/Browser Baseline Requirements, Appendix (B)(3)(G) makes me confused
# In either case, you probably only need serverAuth.
# extendedKeyUsage = serverAuth, clientAuth
[ alternate_names ]
DNS.1 = funkwhale.test
DNS.2 = node1.funkwhale.test
DNS.3 = node2.funkwhale.test
DNS.4 = node3.funkwhale.test
DNS.5 = localhost
DNS.6 = 127.0.0.1
# Add these if you need them. But usually you don't want them or
# need them in production. You may need them for development.
# DNS.5 = localhost
# DNS.6 = localhost.localdomain
# DNS.7 = 127.0.0.1
# IPv6 localhost
# DNS.8 = ::1

View file

@ -1,27 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEiTCCA3GgAwIBAgIUYxpKxPZIyG2n6qTPNESvYX/VpkowDQYJKoZIhvcNAQEL
BQAwfzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMREwDwYDVQQHDAhOZXcgWW9y
azEVMBMGA1UECgwMRXhhbXBsZSwgTExDMRgwFgYDVQQDDA9FeGFtcGxlIENvbXBh
bnkxHzAdBgkqhkiG9w0BCQEWEHRlc3RAZXhhbXBsZS5jb20wHhcNMjAwMTA5MTM0
ODMyWhcNMzAwMTA2MTM0ODMyWjB/MQswCQYDVQQGEwJVUzELMAkGA1UECAwCTlkx
ETAPBgNVBAcMCE5ldyBZb3JrMRUwEwYDVQQKDAxFeGFtcGxlLCBMTEMxGDAWBgNV
BAMMD0V4YW1wbGUgQ29tcGFueTEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl
LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL1SKznmggF6IaCF
4Jq+CHl9x8tmteQkws+ix65J2Id104fSibrRK8If3LMbKlrmXrpXFIl1TvDGPJQd
emcJhy3tFXR0eRqPTyqOfwxVy4AW7plMpemsoDrk8uONtwUdwmNNRsPeppIIEov7
aj6SWGLzFUjoKwHbXsfy2ff80/9EP7zkJr1ts6VPbPafExDKT225OoANlZ4B3bOG
bviWcP5+HuWUolA1wcyIqLXpc9Lw1M6NsC252sgje9IBpx1NhGe5QNAg5p3BA75/
jbOQH0qSo1xm9cV+FNQJpBybnZ5wuUEgsPJ87MtTIbr0cM5IiarUr/kvyg4sywDV
e07Aaw0CAwEAAaOB/DCB+TAdBgNVHQ4EFgQU9wRYbfo7sxyDITOZCK0H8udIaiww
HwYDVR0jBBgwFoAU9wRYbfo7sxyDITOZCK0H8udIaiwwCQYDVR0TBAIwADALBgNV
HQ8EBAMCBaAwcQYDVR0RBGowaIIOZnVua3doYWxlLnRlc3SCFG5vZGUxLmZ1bmt3
aGFsZS50ZXN0ghRub2RlMi5mdW5rd2hhbGUudGVzdIIUbm9kZTMuZnVua3doYWxl
LnRlc3SCCWxvY2FsaG9zdIIJMTI3LjAuMC4xMCwGCWCGSAGG+EIBDQQfFh1PcGVu
U1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTANBgkqhkiG9w0BAQsFAAOCAQEAmXD3
pjwYG4M4NTixkxs9KvdQE5yDqOMEh5ZMygA7/kRbKrYLaFgDYYsNlRFqJNz3sDLe
jTU663Eur5TdwTNiksa11VB3qKCrgQIzhjOavofF0ODfaNBtHtBWwEcpq0t2MnWP
kWot/kqpUcphbx5zyzqHHjiSnNUu16PS/lepNZyQIrfSy23+WIEYEiTbDYqS38SX
p8Pc+i9hQyeOwo4CYnuoPcIRtL/zsFl7WnWKVqXqr7w0PDWus226xO2ZMMLRkMi5
scufzyGBJAsedlCXIbJ+azYlZ2yTr98C7ffEA1PSuhO7wTUim/LUo0UBC/bs6wpc
ZxMkNLp6IaHhNEIeyA==
-----END CERTIFICATE-----

View file

@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC9Uis55oIBeiGg
heCavgh5fcfLZrXkJMLPoseuSdiHddOH0om60SvCH9yzGypa5l66VxSJdU7wxjyU
HXpnCYct7RV0dHkaj08qjn8MVcuAFu6ZTKXprKA65PLjjbcFHcJjTUbD3qaSCBKL
+2o+klhi8xVI6CsB217H8tn3/NP/RD+85Ca9bbOlT2z2nxMQyk9tuTqADZWeAd2z
hm74lnD+fh7llKJQNcHMiKi16XPS8NTOjbAtudrII3vSAacdTYRnuUDQIOadwQO+
f42zkB9KkqNcZvXFfhTUCaQcm52ecLlBILDyfOzLUyG69HDOSImq1K/5L8oOLMsA
1XtOwGsNAgMBAAECggEAAbgEQnNQTNkiAwYUIvOEui2lKbiWACtBRYdRzshG2fv8
3qfPrk2F2y5U359ohAjBZWmy+wiAnfj+xc16tgLFImqbnkIMc2xHqLhAeQkyXshW
hDfI7dUuYzp+5gf8WGSLxkEGWnLkCkFegbzXmxfTC5rvX4kUEuE9/Ay9Y938wr2E
26qdRGxtfVsnFFkLXmj50W3AyF6nBRqZsaS2x8JpHTdw7AjevpL/au2nz1p1rTK9
6cR/V4Hy+dtXLgm0mLdg1G+CJmanjqiweaD4+m91rFTagFIFKf/t5i4IZMu/BLT7
OuylxvEnvZH4p3aSOF1ME0Uv4n2Pzb7Iov/ZZ52/AQKBgQD4qnuj4V3ASXqsraMH
m5MtpBlKAZkngWFesi5ZFijgyutfbIcCPwFOGuXmcaTMj9HtTIwAki+mxkN87UmV
ZM+em2ZJz6srRGvIGN5CMJaJtOPdh3iMjI5QdefJ5gkk207YKzKVw4sw5C+tr4Sr
Uyf3K5ttL+CS5bo26CVXGLlpwQKBgQDC55wrgIzC1VDoFU0N2AZqU31tpP2DTIxc
eu4PqEMF0hjtTh4R5JHR827PmcW3VCaZ1+Fet8+yJ5nZTHWJlFyIg3dIyebn9dau
Yy256S+/1tq7ACmTzw3tn/125g4Is6Sz8yHdZ1YejHqyrK8nmyxuHJVEpWgLI+Ru
U9qQAQqcTQKBgAYb2hG6lZ0FsRfQ5DJppgH3CBADXgnUadnzsqPJoZN0KLgdaGur
tJKAoqk4nX3RAq07tizFappEQKAvDCG5akhRNQAXM/NKKQOvaLZjjy8u3HIyw8lg
IpbjbqBNIGhhYtx4ozN+rEq1MF6p8y5qSo8N6TGTfYbeUebLaS9skhGBAoGAcmZF
uRb8CAPzODYAg0awBUq6DVhRYPbWUBXrk48cv9bgwLEgXzo9CPGMshe9AG1JNvWK
l/Dl3Nj3qZ8CQl2trocTxcqUWMRoXPVjyoJ/f2eZ/TcMMHDQ6RAGUvqXdC4VV3Y3
A2B7IPUts6A+Ms4W1w654o//sMJBeyyG1g12b+UCgYEA9oLi1licSby9pGuuZXqf
q5zyGzM3adQzOrUNR+GTOAnoQD7tcz2jTvlmn0yv66NzBoy8FAD+UNOiMGipe8Au
1Y3XVCeYho0crCRJP3/fLLmjNe1P/Ijgujpb5jEgCA91opWSpqRVjIspGU0YOApU
jCCVQukqEnud65ur9FLD4a8=
-----END PRIVATE KEY-----

View file

@ -1,26 +0,0 @@
defaultEntryPoints = ["http", "https"]
[accessLog]
################################################################
# Web configuration backend
################################################################
[web]
address = ":8040"
################################################################
# Docker configuration backend
################################################################
[docker]
domain = "funkwhale.test"
watch = true
exposedbydefault = false
[entryPoints]
[entryPoints.http]
address = ":80"
# [entryPoints.http.redirect]
entryPoint = "http"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[[entryPoints.https.tls.certificates]]
certFile = "/ssl/traefik.crt"
keyFile = "/ssl/traefik.key"

View file

@ -1,21 +0,0 @@
version: "2.1"
services:
traefik:
image: traefik:alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.toml:/traefik.toml
- ./ssl/test.key:/ssl/traefik.key
- ./ssl/test.crt:/ssl/traefik.crt
ports:
- "80:80"
- "443:443"
- "8040:8040"
networks:
federation:
networks:
federation:
name: federation
external: true

55
docs/Taskfile.yml Normal file
View file

@ -0,0 +1,55 @@
# https://taskfile.dev
version: '3'
env:
POETRY_VIRTUALENVS_IN_PROJECT: true
vars:
DSTDIR: _build
LOCALES: en_GB en_US fr
SPHINX_OPTS: -j 4
SRCDIR: .
tasks:
default:
cmds:
- echo "To see the available tasks, run task -l"
silent: true
install:
desc: Install required dependencies
cmds:
- poetry install --no-root
- poetry run pip install --no-deps --editable ../api
clean:
desc: Remove generated artifacts
cmds:
- git clean -xdf .
dev:
desc: Start a development web server
cmds:
- poetry run sphinx-autobuild . /tmp/_build/ --port 8001
locale-gen:
desc: Generate translations
cmds:
- poetry run sphinx-build -b gettext {{.SRCDIR}} locales/gettext {{.SPHINX_OPTS}}
locale-update:
desc: Update translations
cmds:
- for: { var: LOCALES }
cmd: poetry run sphinx-intl update -p locales/gettext {{.ITEM}}
locale-prune-untranslated:
desc: Prune untranslated locales
cmds:
- poetry run _scripts/locale-prune-untranslated.py
build:
desc: Build documentation
cmds:
- poetru run sphinx-build {{.SRCDIR}} {{.DSTDIR}} {{.SPHINX_OPTS}}
build-translated:
desc: Build (translated) documentation
cmds:
- for: { var: LOCALES }
cmd: poetry run sphinx-build {{.SRCDIR}} {{.DSTDIR}}/{{.ITEM}} {{.SPHINX_OPTS}} -D language={{.IT
- for: { var: LOCALES }
cmd: poetry run sphinx-build {{.SRCDIR}} {{.DSTDIR}}/{{.ITEM}} {{.SPHINX_OPTS}} -D language={{.ITEM}}

35
front/Taskfile.yml Normal file
View file

@ -0,0 +1,35 @@
# https://taskfile.dev
version: '3'
vars:
TASK_LIST: task -l
tasks:
default:
cmds:
- echo "See a list of the available tasks with {{.TASK_LIST}}"
silent: true
install:
desc: Install required dependencies
cmds:
- yarn install
build:
desc: Build the frontend
cmds:
- task: install
- yarn build:deployment
env:
NODE_ENV: production
build-dev:
desc: Build the frontend (for developer usage)
cmds:
- task: install
- yarn build
env:
NODE_ENV: development
serve:
desc: Run a staging server (for developer usage)
cmds:
- task: install
- yarn serve