Skip to content

Commit a364380

Browse files
committed
refining the requirements
1 parent 5c496d5 commit a364380

3 files changed

Lines changed: 61 additions & 1 deletion

File tree

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Use official Python image
2+
FROM python:3.13-slim
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy requirements first (for caching)
8+
COPY requirements.txt .
9+
10+
# Install dependencies
11+
RUN pip install --no-cache-dir --upgrade pip && \
12+
pip install --no-cache-dir -r requirements.txt
13+
14+
# Copy the rest of the app
15+
COPY . .
16+
17+
# Expose FastAPI port
18+
EXPOSE 8000
19+
20+
# Run FastAPI
21+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]

docker-compose.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: "3.9"
2+
3+
services:
4+
app:
5+
build: .
6+
container_name: event-notifier
7+
ports:
8+
- "8000:8000"
9+
env_file: .env
10+
depends_on:
11+
- db
12+
- rabbitmq
13+
14+
db:
15+
image: postgres:16
16+
container_name: event-notifier-db
17+
environment:
18+
POSTGRES_USER: postgres
19+
POSTGRES_PASSWORD: password
20+
POSTGRES_DB: notifications
21+
ports:
22+
- "5432:5432"
23+
volumes:
24+
- postgres_data:/var/lib/postgresql/data
25+
26+
rabbitmq:
27+
image: rabbitmq:3-management
28+
container_name: event-notifier-rabbit
29+
ports:
30+
- "5672:5672"
31+
- "15672:15672"
32+
environment:
33+
RABBITMQ_DEFAULT_USER: guest
34+
RABBITMQ_DEFAULT_PASS: guest
35+
36+
volumes:
37+
postgres_data:

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ six==1.17.0
4242
Authlib==1.6.7
4343
itsdangerous==2.2.0
4444
ecdsa==0.19.1
45+
httpcore==1.0.9
46+
httpx==0.28.1
4547

4648
# =========================
4749
# Event-Driven Messaging
@@ -65,7 +67,7 @@ httptools==0.7.1
6567
# =========================
6668
pytest==9.0.2
6769
iniconfig==2.3.0
68-
pygments==2.19.2
70+
Pygments==2.19.2
6971
pluggy==1.6.0
7072

7173
# =========================

0 commit comments

Comments
 (0)