From 91e2963d946753e924213c63c90c929008c6394e Mon Sep 17 00:00:00 2001 From: ITQ Date: Fri, 5 Apr 2024 18:17:15 +0300 Subject: [PATCH] fix: Fixes before publishing to GitHub --- README.md | 4 ---- check.sh | 18 ------------------ docker-compose.yml | 14 +++++++------- template.env | 2 +- 4 files changed, 8 insertions(+), 30 deletions(-) delete mode 100644 check.sh diff --git a/README.md b/README.md index 781f11f..2922565 100644 --- a/README.md +++ b/README.md @@ -255,7 +255,3 @@ docker compose pull ```bash docker compose up -d --build ``` - -## 📝 Notes - -I thought up the architecture of the project myself, I won't mind feedback on it) diff --git a/check.sh b/check.sh deleted file mode 100644 index c68ec96..0000000 --- a/check.sh +++ /dev/null @@ -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" diff --git a/docker-compose.yml b/docker-compose.yml index 9d1dedd..836375a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,7 @@ version: "3" services: postgres: image: postgres:16.2-alpine - container_name: postgres + container_name: travel_agent-postgres healthcheck: test: pg_isready -U postgres -h localhost interval: 5s @@ -21,7 +21,7 @@ services: redis: image: redis:7.2-alpine - container_name: redis + container_name: travel_agent-redis healthcheck: test: ["CMD", "redis-cli", "--raw", "incr", "ping"] ports: @@ -31,24 +31,24 @@ services: app: build: . - container_name: app + container_name: travel_agent-app depends_on: postgres: condition: service_healthy redis: condition: service_healthy environment: - BOT_TOKEN: ${BOT_TOKEN:-6943803094:AAFxMjuiaqLlQbITUOVPlKx6SKIofKrThwk} + BOT_TOKEN: ${BOT_TOKEN} REDIS_URL: redis://redis:${REDIS_PORT:-6379}/ SQLALCHEMY_DATABASE_URI: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-postgres} - OPENTRIPMAP_API_KEY: ${OPENTRIPMAP_API_KEY:-5ae2e3f221c38a28845f05b65004e18feef4a0f1a06c9554424e9f14} - OPENWEATHERMAP_API_KEY: ${OPENWEATHERMAP_API_KEY:-3673b2ff64c097b3f79fc93e429e7ed1} + OPENTRIPMAP_API_KEY: ${OPENTRIPMAP_API_KEY} + OPENWEATHERMAP_API_KEY: ${OPENWEATHERMAP_API_KEY} entrypoint: ["bash", "-c"] command: ["alembic -c app/alembic.ini upgrade head && python -m app"] pgadmin: image: dpage/pgadmin4:8.4 - container_name: pgadmin + container_name: travel_agent-pgadmin depends_on: postgres: condition: service_healthy diff --git a/template.env b/template.env index 3f82b89..9fa4684 100644 --- a/template.env +++ b/template.env @@ -1,6 +1,6 @@ # For app -BOT_TOKEN = # default: 6943803094:AAFxMjuiaqLlQbITUOVPlKx6SKIofKrThwk +BOT_TOKEN = # get from https://t.me/BotFather SQLALCHEMY_DATABASE_URI = # no need to specify if docker is used REDIS_URL = # no need to specify if docker is used OPENTRIPMAP_API_KEY = # get it from https://dev.opentripmap.org/