Compare commits
4 Commits
master
...
remove-idf
Author | SHA1 | Date | |
---|---|---|---|
dea6b928e1
|
|||
76d4c8a641
|
|||
7423511a51
|
|||
c81d234426
|
3
backend/.gitignore
vendored
3
backend/.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
!**/__pycache__/
|
**/__pycache__/
|
||||||
|
poetry.lock
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||||
CREATE USER idfm_matrix_bot;
|
CREATE USER cer_user WITH ENCRYPTED password 'cer_password';
|
||||||
CREATE DATABASE bot;
|
CREATE DATABASE cer_db;
|
||||||
CREATE DATABASE idfm;
|
\c cer_db;
|
||||||
GRANT ALL PRIVILEGES ON DATABASE bot TO idfm_matrix_bot;
|
CREATE EXTENSION IF NOT EXISTS pg_trgm SCHEMA "public";
|
||||||
GRANT ALL PRIVILEGES ON DATABASE idfm TO idfm_matrix_bot;
|
GRANT CREATE ON SCHEMA public to cer_user;
|
||||||
EOSQL
|
EOSQL
|
||||||
|
|
||||||
|
@@ -8,10 +8,10 @@ from fastapi.responses import JSONResponse
|
|||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
from rich import print
|
from rich import print
|
||||||
|
|
||||||
from idfm_matrix_backend.db import db
|
from backend.db import db
|
||||||
from idfm_matrix_backend.idfm_interface import IdfmInterface
|
from backend.idfm_interface import IdfmInterface
|
||||||
from idfm_matrix_backend.models import Line, Stop, StopArea
|
from backend.models import Line, Stop, StopArea
|
||||||
from idfm_matrix_backend.schemas import (
|
from backend.schemas import (
|
||||||
Line as LineSchema,
|
Line as LineSchema,
|
||||||
TransportMode,
|
TransportMode,
|
||||||
NextPassage as NextPassageSchema,
|
NextPassage as NextPassageSchema,
|
||||||
@@ -24,7 +24,7 @@ API_KEY = environ.get("API_KEY")
|
|||||||
# TODO: Add error message if no key is given.
|
# TODO: Add error message if no key is given.
|
||||||
|
|
||||||
# TODO: Remove postgresql+asyncpg from environ variable
|
# TODO: Remove postgresql+asyncpg from environ variable
|
||||||
DB_PATH = "postgresql+asyncpg://postgres:postgres@127.0.0.1:5438/idfm"
|
DB_PATH = "postgresql+asyncpg://cer_user:cer_password@127.0.0.1:5438/cer_db"
|
||||||
|
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "idfm-matrix-widget"
|
name = "carrramba-encore-rate"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Adrien SUEUR <me@adrien.run>"]
|
authors = ["Adrien SUEUR <me@adrien.run>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
packages = [{include = "idfm_matrix_backend"}]
|
packages = [{include = "backend"}]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.11"
|
python = "^3.11"
|
||||||
|
1
frontend/.gitignore
vendored
1
frontend/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
pnpm-lock.yaml
|
||||||
|
Reference in New Issue
Block a user