feat: add memory-service to docker-compose.yml

- Add memory-service as a service (not under networks:)
- Create Dockerfile for memory-service
- Configure depends_on city-db with healthcheck condition
- Set DATABASE_URL to connect to city-db
This commit is contained in:
Apple
2025-11-15 11:40:07 -08:00
parent 802e092e5b
commit d50765f2ff
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
FROM python:3.11-slim
WORKDIR /app
# Встановлюємо системні залежності
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
curl \
&& rm -rf /var/lib/apt/lists/*
# Копіюємо requirements та встановлюємо залежності
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Копіюємо код
COPY . .
# Відкриваємо порт
EXPOSE 8000
# Запускаємо додаток
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]