To initial third-party, you need to update submodule.
git submodule update --init
You can clone the project with git
git clone https://github.com/AdminTL/gestion_personnage_TL.git
Or download it from here : https://github.com/AdminTL/gestion_personnage_TL/archive/master.zip
You need python3.5
sudo pacman -S python python-pip
sudo pip install -r requirements.txt
brew install python3
sudo pip3 install -r requirements.txt
sudo apt-get install python3 python3-pip
sudo pip3 install -r requirements.txt
If you have problem with oauth2client, maybe you need to update pyasn.
sudo apt-get --reinstall install python-pyasn1 python-pyasn1-modules
or
sudo pip3 install --upgrade google-auth-oauthlib
or install all Google tools
sudo pip3 install -U pypinfo
Install python 3 from https://www.python.org/downloads/ using the installer Install nodejs if not done already https://nodejs.org/en/download/ Start a cmd prompt with admin privileges by right-clicking->run as administrator (git-bash works well)
pip3 install -r requirements.txt
We use bower to update and install javascript code. Only need in develop or server without Internet.
You don't need bower if you execute the server with the --use_internet_static argument Because this option will get dependencies on Internet directly.
You need to install bower and execute the install command :
cd src/web
bower install
Choose the first option if bower asks to resolve conflict.
To disable authentication, use argument --disable_login To disable oauth authentication, use argument --disable_login_oauth
Run ./script/web_server.sh to launch the server.
On production server, you need to specify your host and port. Run instance with argument :
-l HOST:PORT
When using http, use port 80.
When using https, use port 443.
When using http with https "--redirect_http_to_https", use port 80.
To enable https, you can generate a certificate ssl.
- Edit your domain in file ssl_cert/domains.txt
- Adapt the configuration file ssl_cert/config
- On config, set your email address
- On config, enable CA=... with staging address to test the script.
- And execute :
./script/justletsencrypt.sh
You can setup the daemon with Systemctl.
sudo cp ./script/gestion_personnage.service /etc/systemd/system/gestion_personnage.service
Edit the file on destination with argument you need.
Update the variable WorkingDirectory
and ExecStart
.
Run the daemon:
sudo systemctl enable gestion_personnage.service
sudo systemctl start gestion_personnage.service
Create user database.
touch database/client_secret.json
Create you a user.
TODO missing admin permission, ask help TODO missing Google Spreadsheet documentation
--debug : Enable debug (default=False)
--open_browser : Open web browser on tabulation on server start (default=False)
--static_dir : Web: Static files directory (default=WEB_DEFAULT_STATIC_DIR)
--template_dir : Web: Template files directory (default=WEB_DEFAULT_TEMPLATE_DIR)
--db_path : Specify a path for database file. (default=DB_DEFAULT_PATH)
--db_demo : Use demo database. This option keeps all information in memory and does not save to the real database. (default=False)
--web-listen-address : Web: Web server listen address (default=Listen())
--ssl : Activate https and create ssl files if they don't exist. Doesn't work in Windows. (default=False)
--redirect_http_to_https : when you need to support external link with http, this will redirect request to https.
--use_internet_static : Not implemented. Force using static files like css and js from another internet website. Use web browser cache. (default=False)
--disable_login : Disable authentication
--disable_login_oauth : Disable authentication oauth
--disable_character : Disable access to character
--disable_user_character : Disable access to user of our character
--disable_message_character : Disable message to user in your character sheet from administration