Browse Source

Merge branch 'master' of Eragon/PCv5 into master

pull/12/head
Lephenixnoir 6 months ago
parent
commit
8ce3785134
8 changed files with 66 additions and 1 deletions
  1. 3
    0
      .env
  2. 16
    0
      .gitignore
  3. 25
    0
      Pipfile
  4. 4
    1
      REQUIREMENTS.md
  5. 9
    0
      requirements.txt
  6. 4
    0
      scripts/init.sh
  7. 3
    0
      scripts/migrate.sh
  8. 2
    0
      scripts/run_dev.sh

+ 3
- 0
.env View File

@@ -0,0 +1,3 @@
FLASK_APP=V5.py
FLASK_DEBUG=1
FLASK_ENV=DEVLOPPEMENT

+ 16
- 0
.gitignore View File

@@ -1,8 +1,24 @@
# Python files and caches
__pycache__/
app/__pycache__/
app/static/avatars/

## Devlopement files

# virtualenv
venv/
.venv/
# pipenv
Pipfile.lock
# Sublime Text files
*.sublime-project
*.sublime-workspace

## Deployment files

# uWSGI configuration file
uwsgi.ini
# Main script: mounts Flask app on uWSGI workers (serviced by systemd)
run.sh
# Update script to pull repository from SSH
update.sh

+ 25
- 0
Pipfile View File

@@ -0,0 +1,25 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
flask = ">=1.0"
flask-wtf = ">=0.14"
flask-login = ">=0.4"
flask-migrate = ">=2.3 "
flask-sqlalchemy = ">=2.3"
flask-script = ">=2.0"
uwsgi = ">=2.0"
psycopg2-binary = ">=2.7"
pyyaml = ">=3.13"

[dev-packages]

[requires]
python_version = "3.7"

[scripts]
init = "scripts/init.sh"
migrate = "scripts/migrate.sh"
run_dev = "scripts/run_dev.sh"

+ 4
- 1
REQUIREMENTS.md View File

@@ -3,7 +3,7 @@
Attention, l'environnement est sous `python3`. Vérifiez que ce soit bien le cas sur votre config, quitte
à faire un virtual environment.

La liste de paquets fourni est pour Archlinux, les paquets peuvent avoir des noms légèrement différents dans votre distribution.
```
python3
python-flask
@@ -12,4 +12,7 @@ python-flask-migrate
python-flask-script
python-flask-sqlalchemy
python-flask-wtf
python-uwsgi
python-psycopg2
python-pyyaml
```

+ 9
- 0
requirements.txt View File

@@ -0,0 +1,9 @@
flask
flask-login
flask-migrate
flask-script
flask-sqlalchemy
flask-wtf
uwsgi
psycopg2
pyyaml

+ 4
- 0
scripts/init.sh View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
flask db init
flask db migrate -m "initialisation"
flask db upgrade

+ 3
- 0
scripts/migrate.sh View File

@@ -0,0 +1,3 @@
#!/usr/bin/env sh
flask db migrate -m $1
flask db upgrade

+ 2
- 0
scripts/run_dev.sh View File

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
flask run

Loading…
Cancel
Save