DAS_2023_1/basharin_sevastyan_lab_3
2023-11-24 22:22:08 +04:00
..
nginx worked nginx 2023-11-24 07:55:12 +04:00
order_service all worked api with nginx 2023-11-24 22:22:08 +04:00
user_service all worked api with nginx 2023-11-24 22:22:08 +04:00
docker-compose.yaml worked nginx 2023-11-24 07:55:12 +04:00
README.md ready< not test 2023-11-21 23:45:46 +04:00

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"]