Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FoD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
David Schmitz
FoD
Commits
c2157d81
Commit
c2157d81
authored
2 years ago
by
David Schmitz
Browse files
Options
Downloads
Patches
Plain Diff
install-debian.sh
parent
b3e7744d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install-debian.sh
+53
-19
53 additions, 19 deletions
install-debian.sh
with
53 additions
and
19 deletions
install-debian.sh
+
53
−
19
View file @
c2157d81
...
...
@@ -97,6 +97,23 @@ function conf_db_access () {
}
function
debug_python_deps
()
{
venv_file
=
"
$1
"
exit_code
=
"
$2
"
echo
"debug_python_deps(): venv_file=
$venv_file
exit_code=
$exit_code
"
1>&2
[
-z
"
$venv_file
"
]
||
.
"
$venv_file
"
echo
1>&2
echo
"# Python dependencies: "
1>&2
pip list
echo
"# End of Python dependencies"
1>&2
[
-z
"
$exit_code
"
]
||
exit
"
$exit_code
"
}
##
##############################################################################
##############################################################################
...
...
@@ -458,7 +475,15 @@ else
(
cd
flowspy
# jump into settings subdir flowspy
if
[
"
$inside_docker
"
=
1
-a
-e
settings.py.docker
]
;
then
# user has own settings prepared yet ?
if
[
"
$inside_docker
"
=
1
-a
-e
settings.py.docker.debian
]
;
then
# user has own settings prepared yet ?
cp
-f
settings.py.docker.debian settings.py
elif
[
settings.py.debian
]
;
then
# user has own settings prepared yet ?
cp
-f
settings.py.debian settings.py
elif
[
"
$inside_docker
"
=
1
-a
-e
settings.py.docker
]
;
then
# user has own settings prepared yet ?
cp
-f
settings.py.docker settings.py
...
...
@@ -492,24 +517,25 @@ else
##
echo
"
$0
: step 2.4.1: preparing log sub dirs"
1>&2
mkdir
-p
"
$fod_dir
/log"
"
$fod_dir
/logs"
touch
"
$fod_dir
/debug.log"
chown
-R
fod:
"
$fod_dir
/log"
"
$fod_dir
/logs"
"
$fod_dir
/debug.log"
if
[
"
$try_install_docu
"
=
1
]
;
then
echo
"
$0
: step 2.4.2: compiling internal docu"
1>&2
echo
"trying to install mkdocs-based documentation"
1>&2
(
set
-e
which mkdocs 2>/dev/null
>
/dev/null
||
apt-get
install
-y
mkdocs
cd
"
$fod_dir
"
&&
mkdocs build
true
# in case of failure override failure status, as the documentation is non-essential
)
fi
echo
"
$0
: step 2.3.1: preparing log sub dirs"
1>&2
mkdir
-p
"
$fod_dir
/log"
"
$fod_dir
/logs"
touch
"
$fod_dir
/debug.log"
chown
-R
fod:
"
$fod_dir
/log"
"
$fod_dir
/logs"
"
$fod_dir
/debug.log"
if
[
"
$try_install_docu
"
=
1
]
;
then
echo
"
$0
: step 2.3.2: compiling internal docu"
1>&2
echo
"trying to install mkdocs-based documentation"
1>&2
(
set
-e
which mkdocs 2>/dev/null
>
/dev/null
||
apt-get
install
-y
mkdocs
cd
"
$fod_dir
"
&&
mkdocs build
true
# in case of failure override failure status, as the documentation is non-essential
)
fi
##
##
echo
"
$0
: step 2.4: preparing FoD static files and database"
1>&2
echo
"
$0
: step 2.4.1: preparing FoD static files"
1>&2
...
...
@@ -517,7 +543,13 @@ else
#mkdir -p /srv/flowspy/static/
mkdir
-p
"
$static_dir
"
([
!
-f
"fodenv.sh"
]
||
source
"./fodenv.sh"
;
./manage.py collectstatic
--noinput
)
(
[
!
-f
"fodenv.sh"
]
||
source
"./fodenv.sh"
;
source
"
$venv_dir
/bin/activate"
./manage.py collectstatic
--noinput
||
debug_python_deps
"
$venv_dir
/bin/activate"
1
)
##
...
...
@@ -541,6 +573,8 @@ else
(
[
!
-f
"fodenv.sh"
]
||
source
"./fodenv.sh"
source
"
$venv_dir
/bin/activate"
#./manage.py syncdb --noinput
./manage.py migrate
...
...
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