fix: Fixes before publishing to GitHub

This commit is contained in:
ITQ
2024-04-05 18:17:15 +03:00
parent df6b6e8b2d
commit 91e2963d94
4 changed files with 8 additions and 30 deletions
-4
View File
@@ -255,7 +255,3 @@ docker compose pull
```bash ```bash
docker compose up -d --build docker compose up -d --build
``` ```
## 📝 Notes
I thought up the architecture of the project myself, I won't mind feedback on it)
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
GREEN='\033[1;32m'
NC='\033[0m'
sort-requirements requirements/dev.txt
sort-requirements requirements/prod.txt
sort-requirements requirements/test.txt
sort-requirements requirements/lint.txt
printf "${GREEN}Requirements sorted${NC}\n"
black .
flake8 .
mypy .
printf "${GREEN}Linters runned${NC}\n"
# alembic -c app/alembic.ini upgrade head
printf "${GREEN}Tests runned${NC}\n"
+7 -7
View File
@@ -4,7 +4,7 @@ version: "3"
services: services:
postgres: postgres:
image: postgres:16.2-alpine image: postgres:16.2-alpine
container_name: postgres container_name: travel_agent-postgres
healthcheck: healthcheck:
test: pg_isready -U postgres -h localhost test: pg_isready -U postgres -h localhost
interval: 5s interval: 5s
@@ -21,7 +21,7 @@ services:
redis: redis:
image: redis:7.2-alpine image: redis:7.2-alpine
container_name: redis container_name: travel_agent-redis
healthcheck: healthcheck:
test: ["CMD", "redis-cli", "--raw", "incr", "ping"] test: ["CMD", "redis-cli", "--raw", "incr", "ping"]
ports: ports:
@@ -31,24 +31,24 @@ services:
app: app:
build: . build: .
container_name: app container_name: travel_agent-app
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
redis: redis:
condition: service_healthy condition: service_healthy
environment: environment:
BOT_TOKEN: ${BOT_TOKEN:-6943803094:AAFxMjuiaqLlQbITUOVPlKx6SKIofKrThwk} BOT_TOKEN: ${BOT_TOKEN}
REDIS_URL: redis://redis:${REDIS_PORT:-6379}/ REDIS_URL: redis://redis:${REDIS_PORT:-6379}/
SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-postgres} SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-postgres}
OPENTRIPMAP_API_KEY: ${OPENTRIPMAP_API_KEY:-5ae2e3f221c38a28845f05b65004e18feef4a0f1a06c9554424e9f14} OPENTRIPMAP_API_KEY: ${OPENTRIPMAP_API_KEY}
OPENWEATHERMAP_API_KEY: ${OPENWEATHERMAP_API_KEY:-3673b2ff64c097b3f79fc93e429e7ed1} OPENWEATHERMAP_API_KEY: ${OPENWEATHERMAP_API_KEY}
entrypoint: ["bash", "-c"] entrypoint: ["bash", "-c"]
command: ["alembic -c app/alembic.ini upgrade head && python -m app"] command: ["alembic -c app/alembic.ini upgrade head && python -m app"]
pgadmin: pgadmin:
image: dpage/pgadmin4:8.4 image: dpage/pgadmin4:8.4
container_name: pgadmin container_name: travel_agent-pgadmin
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
+1 -1
View File
@@ -1,6 +1,6 @@
# For app # For app
BOT_TOKEN = <your_bot_token> # default: 6943803094:AAFxMjuiaqLlQbITUOVPlKx6SKIofKrThwk BOT_TOKEN = <your_bot_token> # get from https://t.me/BotFather
SQLALCHEMY_DATABASE_URI = <database_uri> # no need to specify if docker is used SQLALCHEMY_DATABASE_URI = <database_uri> # no need to specify if docker is used
REDIS_URL = <redis_url> # no need to specify if docker is used REDIS_URL = <redis_url> # no need to specify if docker is used
OPENTRIPMAP_API_KEY = <api_key> # get it from https://dev.opentripmap.org/ OPENTRIPMAP_API_KEY = <api_key> # get it from https://dev.opentripmap.org/