Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
V
veximpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
6
Snippets
Groups
Projects
Show more breadcrumbs
Markus
veximpy
Commits
e1a5c753
Commit
e1a5c753
authored
1 month ago
by
Markus
Browse files
Options
Downloads
Patches
Plain Diff
remove venv from setup
parent
de18f651
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup/pysetup.sh
+44
-13
44 additions, 13 deletions
setup/pysetup.sh
with
44 additions
and
13 deletions
setup/pysetup.sh
+
44
−
13
View file @
e1a5c753
#!/bin/bash
# This file is part of veximpy
# Install Python packages in the system
sudo
apt
install
mariadb-server python3 python3-venv python3-pip python3-pytest python3-flask python3-flask-bootstrap python3-flask-login python3-flask-migrate python3-dotenv python3-passlib python3-flaskext.wtf python3-validators python3-wtforms python3-wtforms-components python3-pymysql python3-sqlalchemy
sudo
apt
install
nginx-full uwsgi uwsgi-plugin-python3
#sudo pip3 install flask_bootstrap flask_debugtoolbar wtforms
# Create Virtual Environment
python3
-m
venv venv
.
venv/bin/activate
pip3
install
-r
requirements.txt
ln
-s
venv/bin/activate
# Install DB server
sudo
apt
install
\
mariadb-server
# Install Python packages in the system
sudo
apt
install
\
python3
\
python3-pytest
\
python3-flask
\
python3-flask-bootstrap
\
python3-flask-login
\
python3-flask-migrate
\
python3-dotenv
\
python3-passlib
\
python3-flaskext.wtf
\
python3-validators
\
python3-wtforms
\
python3-wtforms-components
\
python3-pymysql
\
python3-sqlalchemy
echo
"export FLASK_CONFIG=development; export FLASK_APP=run.py; export PYTHONPATH=
${
PYTHONPATH
}
:
$(
pwd
)
"
>>
activate
# Install webserver
sudo
apt
install
\
nginx-full
\
uwsgi
\
uwsgi-plugin-python3
# Prepare the config files for uwsgi and nginx
echo
"you will find sample config files for nginx and uwsgi in doc/{nginx|uwsgi} directories"
echo
"make sure to use the correct path for certificates and the correct servername"
sed
"s/###dir###/
$(
pwd
)
/"
doc/nginx/veximpy.template
>
doc/nginx/veximpy
sed
"s/###dir###/
$(
pwd
)
/"
doc/uwsgi/veximpy.ini.template
>
doc/uwsgi/veximpy.ini
...
...
@@ -23,6 +42,18 @@ if [[ ! -z ${1} ]]; then
sed
"s/###servername###/
${
1
}
/"
doc/nginx/veximpy.template
>
doc/nginx/veximpy
fi
echo
"you will find sample config files for nginx and uwsgi in doc/{nginx|uwsgi} directories"
echo
"make sure to use the correct path for certificates and the correct servername"
echo
"you should be able to activate the python environment with
\`
. activate
\`
"
# Install Python virtual environment (optional)
#sudo apt install \
#python3-venv \
#python3-pip
#
#python3 -m venv venv
#. venv/bin/activate
#pip3 install -r requirements.txt
#ln -s venv/bin/activate
#
#echo "export FLASK_CONFIG=development; export FLASK_APP=run.py; export PYTHONPATH=${PYTHONPATH}:$(pwd)" >> activate
#echo "you should be able to activate the python environment with \`. activate\`"
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