Untitled

 avatar
unknown
plain_text
2 years ago
1.3 kB
6
Indexable
version: '3'
services:
  api:
    deploy:
      restart_policy:
        condition: on-failure
    env_file: docker.env
    image: "fastapi-template-api"
    build: .
    # Run this contain as if it's in the terminal, useful for debugging
    tty: true
    # Mount local files into the container so we can update files inside the container
    volumes:
      - .:/project
    expose:
      - "7071"
    ports:
      - 0.0.0.0:7071:7071
    command: bash -c "
      ./scripts/ssl_cert/add_zscaler_cert.sh && 
      func start"
    depends_on:
      - db
      - azurite
  db:
    deploy:
      restart_policy:
        condition: on-failure
    image: library/postgres:13
    restart: alwaysgi
    expose:
      - "5432"
    ports:
      - 0.0.0.0:5432:5432
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=fastapi-template
  
  azurite:
    deploy:
      restart_policy:
        condition: on-failure
    image: mcr.microsoft.com/azure-storage/azurite:latest
    restart: always
    expose:
      - "10000"
      - "10001"
      - "10002"
    ports:
      - 0.0.0.0:10000:10000
      - 0.0.0.0:10001:10001
      - 0.0.0.0:10002:10002

volumes:
  db_data:
Editor is loading...