Public Repository

Last pushed: 2 months ago
Short Description
Short description is empty for this repo.
Full Description

download
@@ install python
apt-get install python-pip python-dev build-essential gunicorn bcrypt passlib
pip install --upgrade pip
apt-get install git vim net-tools
git clone https://github.com/lmeunier/flaskup
pip install -r requirements.txt
python setup.py install
python

import os
os.urandom(24)
'_\x12\xab\x90D\xc4\xfd{\xd9\xe2\xf3-\xa8\xd3\x1d\x1ej\x8b\x13x\x8ce\xc5\xe0'

@@ create flask_config
vim flaskup_config.py
-- coding: utf-8 --

from passlib.hash import bcrypt

DEBUG = True
SECRETKEY = '\x12\xab\x90D\xc4\xfd{\xd9\xe2\xf3-\xa8\xd3\x1d\x1ej\x8b\x13x\x8ce\xc5\xe0'
FLASKUP_UPLOAD_FOLDER = '/srv/flaskup/data'
FLASKUP_MAX_DAYS = 10
FLASKUP_KEY_LENGTH = 4
MAIL_DEFAULT_SENDER = 'flaskup@example.com'
FLASKUP_ADMINS = ['admin@example.com', 'admin@example.org']
FLASKUP_NOTIFY = ['add', 'delete']
FLASKUP_UPLOAD_PASSWORDS = [
('$2a$12$oIWeziyq4wjF08gntfU4w.AQZfYbbQoK7y13ParN83G7ta.qtN2.e', 'pw1'),
('$2a$12$zQ/hzog/iYr49fbo0mitS.y9f.uHP.7IyqWgk5/S1Ict50HRl4XxW', 'pw2'),
]
FLASKUP_UPLOAD_PASSWORDS_CHECK = bcrypt.verify

mkdir -p /data/flaskup
export FLASKUP_CONFIG=/path/to/my/flaskup_config.py

docker run --name flaskup -v /data/flaskup:/data/flaskup -p 8001:8001 -it ngoctamtam/flaskup

netstat –ntpa
export FLASKUP_CONFIG=/root/flaskup/flaskup_config.py
gunicorn --bind=<IP_server_local>:8001 flaskup:app
Vi du:
gunicorn --bind= 172.17.0.4:8001 flaskup:app

Docker Pull Command
Owner
ngoctamtam

Comments (0)