basharin_sevastyan_lab_3/
|-- user_service/
| |-- Dockerfile
| |-- requirements.txt
| |-- user_service.py
|-- order_service/
| |-- Dockerfile
| |-- requirements.txt
| |-- order_service.py
|-- nginx/
| |-- Dockerfile
| |-- nginx.conf
|-- docker-compose.yml
version: '3'
services:
user-service:
build:
context: ./user_service
ports:
- "5001:5001"
depends_on:
- rabbitmq
order-service:
build:
context: ./order_service
ports:
- "5002:5002"
depends_on:
- rabbitmq
rabbitmq:
image: "rabbitmq:management"
ports:
- "5672:5672"
- "15672:15672"
nginx:
build:
context: ./nginx
ports:
- "80:80"
depends_on:
- user-service
- order-service
# user_service/Dockerfile
FROM python:3.11
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "user_service.py"]
# user_service/Dockerfile
FROM python:3.11
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "order_service.py"]