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

Download API and frontend files

parent c2ae82f0
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,6 @@ funkwhale_media_path: /srv/funkwhale/data/media
funkwhale_static_path: /srv/funkwhale/data/static
funkwhale_music_path: /srv/funkwhale/data/music
funkwhale_config_path: /srv/funkwhale/config
funkwhale_frontend_path: /srv/funkwhale/frontend/dist
funkwhale_username: funkwhale
funkwhale_database_managed: true
funkwhale_database_name: funkwhale
......
......@@ -8,6 +8,7 @@
vars:
funkwhale_hostname: yourdomain.funkwhale
funkwhale_protocol: https
funkwhale_version: 0.19.0-rc2
funkwhale_env_vars:
- EMAIL_CONFIG=smtp+tls://user@:password@youremail.host:587
- DEFAULT_FROM_EMAIL=noreply@yourdomain
......
......@@ -73,9 +73,9 @@ def test_funkwhale_env_file(host):
f.contains("EMAIL_CONFIG=smtp+tls://user@:password@youremail.host:587") is True
)
assert f.contains("DEFAULT_FROM_EMAIL=noreply@yourdomain") is True
assert f.contains("FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/frontend/dist") is True
assert f.contains("FUNKWHALE_FRONTEND_PATH=/srv/funkwhale/front/dist") is True
assert (
f.contains("FUNKWHALE_SPA_HTML_ROOT=/srv/funkwhale/frontend/dist/index.html")
f.contains("FUNKWHALE_SPA_HTML_ROOT=/srv/funkwhale/front/dist/index.html")
is True
)
assert f.contains("NGINX_MAX_BODY_SIZE=100M") is True
......@@ -84,3 +84,16 @@ def test_funkwhale_env_file(host):
# additional vars
assert f.contains("ADDITIONAL_VAR=1") is True
assert f.contains("ADDITIONAL_VAR=2") is True
def test_frontend_download(host):
f = host.file("/srv/funkwhale/front/dist/index.html")
assert f.exists is True
def test_api_download(host):
f = host.file("/srv/funkwhale/api/funkwhale_api/__init__.py")
assert f.exists is True
assert f.contains('__version__ = "0.19.0-rc2"') is True
......@@ -24,9 +24,27 @@
- name: "Create funkwhale configuration file"
become: true
become_user: "{{ funkwhale_username }}"
template:
src: env.j2
dest: "{{ funkwhale_config_path }}/.env"
owner: "{{ funkwhale_username }}"
vars:
secret_key: secret_key
- name: Download front-end files
become: true
become_user: "{{ funkwhale_username }}"
unarchive:
src: https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/{{ funkwhale_version }}/download?job=build_front
dest: "{{ funkwhale_install_path }}"
remote_src: true
- name: Download api files
become: true
become_user: "{{ funkwhale_username }}"
unarchive:
src: https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/{{ funkwhale_version }}/download?job=build_api
dest: "{{ funkwhale_install_path }}"
remote_src: true
......@@ -24,8 +24,8 @@ MEDIA_ROOT={{ funkwhale_media_path }}
STATIC_ROOT={{ funkwhale_static_path }}
MUSIC_DIRECTORY_PATH={{ funkwhale_music_path }}
MUSIC_DIRECTORY_SERVE_PATH={{ funkwhale_music_path }}
FUNKWHALE_FRONTEND_PATH={{ funkwhale_frontend_path }}
FUNKWHALE_SPA_HTML_ROOT={{ funkwhale_frontend_path }}/index.html
FUNKWHALE_FRONTEND_PATH={{ funkwhale_install_path }}/front/dist
FUNKWHALE_SPA_HTML_ROOT={{ funkwhale_install_path }}/front/dist/index.html
{% if funkwhale_nginx_managed %}
NGINX_MAX_BODY_SIZE={{ funkwhale_nginx_max_body_size }}
{% endif %}
......
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