[mod] Needed changes on the base

This commit is contained in:
Pablo Aramburo 2022-05-08 20:02:39 -06:00
parent 70560bb34e
commit 4c7d8f0dd7
3 changed files with 1254 additions and 27 deletions

View File

@ -7,9 +7,9 @@ services:
ports:
- "24708:5000"
volumes:
- ./logs:/var/log/paraphrasing_bot
- .:/usr/src/app
- ./paraphrasing_bot/templates:/etc/paraphrasing_bot/templates
- /var/log/paraphrasing_bot
env_file:
- .env
depends_on:
@ -27,19 +27,19 @@ services:
- POSTGRES_DB=${POSTGRES_DB}
# volumes:
# - ~/.volumes/paraphrasing_bot/postgres:/var/lib/postgresql/data:rw
pgadmin:
image: dpage/pgadmin4:latest
container_name: paraphrasing_bot_pgadmin
restart: always
ports:
- "45707:80"
volumes:
- ~/.volumes/paraphrasing_bot/pgadmin:/var/lib/pgadmin:rw
depends_on:
- postgres
environment:
PGADMIN_DEFAULT_EMAIL: 'tools@example.com'
PGADMIN_DEFAULT_PASSWORD: 'admin'
# pgadmin:
# image: dpage/pgadmin4:latest
# container_name: paraphrasing_bot_pgadmin
# restart: always
# ports:
# - "45707:80"
# volumes:
# - ~/.volumes/paraphrasing_bot/pgadmin:/var/lib/pgadmin:rw
# depends_on:
# - postgres
# environment:
# PGADMIN_DEFAULT_EMAIL: 'tools@example.com'
# PGADMIN_DEFAULT_PASSWORD: 'admin'
redis:
container_name: paraphrasing_bot_redis
image: redis:6-alpine

View File

@ -4,7 +4,6 @@ from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_cors import CORS
from flask_jwt_extended import JWTManager
from flask_log_request_id import RequestID, RequestIDLogFilter
from logging.handlers import RotatingFileHandler
@ -68,15 +67,3 @@ file_formatter = logging.Formatter(
file_handler.setFormatter(file_formatter)
file_handler.addFilter(RequestIDLogFilter())
logger.addHandler(file_handler)
# JWT config
app.config["JWT_SECRET_KEY"] = app_config.JWT_SECRET
app.config["JWT_ACCESS_TOKEN_EXPIRES"] = timedelta(hours=app_config.JWT_ACCESS_HOURS_DURATION)
app.config["JWT_REFRESH_TOKEN_EXPIRES"] = timedelta(hours=app_config.JWT_REFRESH_HOURS_DURATION)
app.config["JWT_TOKEN_LOCATION"] = ["headers", "query_string"]
app.config["JWT_QUERY_STRING_NAME"] = "token"
app.config["JWT_ALGORITHM"] = app_config.JWT_ALGORITHM
app.config["JWT_DECODE_ALGORITHMS"] = app_config.JWT_ALGORITHM
jwt = JWTManager(app)

1240
poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff