From 4d15346b413fc6d2f22e002b41c290b492df5670 Mon Sep 17 00:00:00 2001 From: everysoftware Date: Wed, 28 May 2025 16:06:19 +0300 Subject: [PATCH 1/2] feat: rename docker compose services --- .env.example | 6 +- docker-compose-prod.yml | 2 +- docker-compose.yml | 43 +++++++++------ fastid/api/{mini_app.py => app.py} | 51 +++++++++++------ fastid/core/app.py | 70 +++++++++--------------- fastid/core/base.py | 31 +++++++---- fastid/core/middlewares/cors.py | 2 +- fastid/dashboard/{mini_app.py => app.py} | 12 ++-- fastid/pages/{mini_app.py => app.py} | 36 ++++++------ fastid/plugins/obs/metrics.py | 4 +- fastid/plugins/obs/tracing.py | 4 +- 11 files changed, 143 insertions(+), 118 deletions(-) rename fastid/api/{mini_app.py => app.py} (59%) rename fastid/dashboard/{mini_app.py => app.py} (87%) rename fastid/pages/{mini_app.py => app.py} (81%) diff --git a/.env.example b/.env.example index 53f2020..e94b34b 100644 --- a/.env.example +++ b/.env.example @@ -4,8 +4,8 @@ MAIN_BASE_URL="http://localhost:8012" # Infrastructure -DB_URL="postgresql+asyncpg://postgres:changethis@db:5432/app" -REDIS_URL="redis://default:changethis@redis:6379/0" +DB_URL="postgresql+asyncpg://postgres:changethis@fastid-db:5432/app" +REDIS_URL="redis://default:changethis@fastid-redis:6379/0" # Notifications NOTIFY_FROM_NAME="FastID" @@ -41,7 +41,7 @@ NOTIFY_SMTP_PASSWORD=... # Plugins #OBS_ENABLED=1 -#OBS_TEMPO_URL="http://host.docker.internal:4317" +#OBS_TEMPO_URL="http://tempo:4317" # Docker environment POSTGRES_USER="postgres" diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index b5f5255..6410873 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -1,4 +1,4 @@ services: - fastapi: + fastid-app: build: target: prod diff --git a/docker-compose.yml b/docker-compose.yml index bf56ed7..46db8a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,20 +1,20 @@ x-logging: &default-logging - # Uncomment below to enable default logging - driver: json-file -# Uncomment below to enable Loki logging -# driver: loki -# options: -# loki-url: 'http://localhost:3100/api/prom/push' -# loki-pipeline-stages: | -# - multiline: -# firstline: '^\d{4}-\d{2}-\d{2} \d{1,2}:\d{2}:\d{2}' -# max_wait_time: 3s -# - regex: -# expression: '^(?P