Skip to content

Commit

Permalink
Fix flask app value and add error log on flask migration
Browse files Browse the repository at this point in the history
  • Loading branch information
LoanR committed Jan 24, 2024
1 parent 7df2108 commit 573537e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
dockerfile: Dockerfile
# env_file:
# - web.env
environment:
- FLASK_APP=b3desk
volumes:
- ./web/logs:/var/log
- ./web/b3desk:/opt/bbb-visio/b3desk
Expand Down
2 changes: 2 additions & 0 deletions documentation/maintainers/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ docker compose -f docker-compose.yml -f docker-compose.prod.yml up
# ou
# docker compose -f docker-compose.yml -f docker-compose.preprod.yml up
```

Le fichier `run_webserver.sh` est lancé par le `Dockerfile` et migre la base de données. Ces docker-compose de prod et preprod peuvent donc être utilisés pour une primo-installation, ou sur une instance existante.
1 change: 0 additions & 1 deletion web.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# App Configuration
FLASK_APP=b3desk
FLASK_DEBUG=True
SECRET_KEY=SomethingNotEntirelySecret
TITLE=BBB-Visio
Expand Down
2 changes: 1 addition & 1 deletion web/misc/run_webserver.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# DB Migration
flask db upgrade >> /var/log/flask-migrate.log
flask db upgrade &>> /var/log/flask-migrate.log

gunicorn --chdir /opt/bbb-visio --bind 0.0.0.0:5000 --log-level warning --access-logfile /var/log/gunicorn-access.log --error-logfile /var/log/gunicorn-error.log wsgi:app

0 comments on commit 573537e

Please sign in to comment.