Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ansible
Manage
Activity
Members
Labels
Plan
Issues
13
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
ansible
Commits
e7913740
Verified
Commit
e7913740
authored
5 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Collect static files and apply migrations
parent
78762822
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
molecule/default/tests/test_default.py
+14
-0
14 additions, 0 deletions
molecule/default/tests/test_default.py
tasks/funkwhale.yml
+20
-0
20 additions, 0 deletions
tasks/funkwhale.yml
tasks/main.yml
+3
-3
3 additions, 3 deletions
tasks/main.yml
with
37 additions
and
3 deletions
molecule/default/tests/test_default.py
+
14
−
0
View file @
e7913740
...
...
@@ -105,3 +105,17 @@ def test_virtualenv(host):
intersection
=
expected_packages
&
names
assert
intersection
==
expected_packages
def
test_static_files_copied
(
host
):
f
=
host
.
file
(
"
/srv/funkwhale/data/static/admin/css/base.css
"
)
assert
f
.
exists
is
True
def
test_migrations_applied
(
host
):
cmd
=
"""
sudo -u postgres psql funkwhale -A -t -c
"
SELECT 1 from django_migrations where app =
'
music
'
and name =
'
0039_auto_20190423_0820
'
;
"
"""
result
=
host
.
run
(
cmd
)
assert
result
.
stdout
==
"
1
"
This diff is collapsed.
Click to expand it.
tasks/funkwhale.yml
+
20
−
0
View file @
e7913740
...
...
@@ -74,6 +74,8 @@
remote_src
:
true
-
name
:
"
Setup
virtualenv"
become
:
true
become_user
:
"
{{
funkwhale_username
}}"
pip
:
name
:
wheel
virtualenv
:
"
{{
funkwhale_install_path
}}/virtualenv"
...
...
@@ -81,7 +83,25 @@
-
name
:
"
Install
python
dependencies"
become
:
true
become_user
:
"
{{
funkwhale_username
}}"
pip
:
requirements
:
"
{{
funkwhale_install_path
}}/api/requirements.txt"
virtualenv
:
"
{{
funkwhale_install_path
}}/virtualenv"
virtualenv_python
:
python3
-
name
:
"
Collect
static
files"
command
:
"
{{
funkwhale_install_path
}}/virtualenv/bin/python
api/manage.py
collectstatic
--no-input"
become
:
true
become_user
:
"
{{
funkwhale_username
}}"
args
:
chdir
:
"
{{
funkwhale_install_path
}}"
-
name
:
"
Apply
database
migrations"
become
:
true
become_user
:
"
{{
funkwhale_username
}}"
command
:
"
{{
funkwhale_install_path
}}/virtualenv/bin/python
api/manage.py
migrate
--no-input"
args
:
chdir
:
"
{{
funkwhale_install_path
}}"
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
3
−
3
View file @
e7913740
---
-
include
:
packages.yml
-
include
:
db.yml
-
include
:
redis.yml
#
- include: packages.yml
#
- include: db.yml
#
- include: redis.yml
-
include
:
funkwhale.yml
-
include
:
nginx.yml
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment