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