docker-compose.yml 547 Bytes
Newer Older
陈正乐 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
version: '3'

services:
  postgres:
    image: postgres
    container_name: lae_pgsql
    environment:
      POSTGRES_PASSWORD: 111111
    ports:
      - "5433:5432"
    volumes:
      - ./lae_pg_data:/var/lib/postgresql/data
      - ./init_db:/docker-entrypoint-initdb.d

  python:
    build:
      context: .
      dockerfile: Dockerfile
    image: lae_python_image:3.10
    container_name: lae_python
    volumes:
      - .:/app
    ports:
      - "8003:8003"
    stdin_open: true
    tty: true
    command: /bin/bash


volumes:
  lae_pg_data: