базу поднял в докере? Если в контейнере сеть между ними расшарил?
version: '3.1' services: web: build: ./ command: ./docker-entrypoint.sh volumes: - ./:/web ports: - "80:80" depends_on: - postgres redis: image: "redis:alpine" ports: - "6379:6379" redis-cacher: image: "redis:alpine" command: --port 6380 ports: - "6380:6380" postgres: image: 'postgres:latest' volumes: - ./postgres-data:/var/lib/postgresql/data ports: - "5432:5432" environment: POSTGRES_USER: user POSTGRES_PASSWORD: password А в dockerfile: FROM python:3.7 ENV PYTHONUNBUFFERED 1 RUN mkdir /web WORKDIR /web COPY requirements.txt /web/ RUN pip3 install -r requirements.txt RUN apt-get update && \ apt-get install -y build-essential libzbar-dev COPY . /web/
Обсуждают сегодня