Files
Hushian/Presentation/AIAss/README-Docker.md
mmrbnjd c889ce9e03 ...
2025-09-01 19:46:37 +03:30

2.0 KiB

AIAss Docker Setup

This document explains how to run the AIAss gRPC service using Docker.

Prerequisites

  • Docker Desktop installed and running
  • Docker Compose (usually comes with Docker Desktop)

Quick Start

  1. Navigate to the AIAss project directory:

    cd Presentation/AIAss
    
  2. Build and run the service:

    docker-compose up --build
    
  3. The service will be available at:

Using Docker directly

  1. Build the Docker image:

    docker build -t aiass .
    
  2. Run the container:

    docker run -p 5000:80 -p 5001:443 aiass
    

Configuration

Environment Variables

  • ASPNETCORE_ENVIRONMENT: Set to Development or Production
  • ASPNETCORE_URLS: Configure the URLs the service listens on

Ports

  • Port 80: HTTP endpoint
  • Port 443: HTTPS endpoint

Development

Hot Reload

For development with hot reload, you can mount the source code:

volumes:
  - .:/src
  - /src/bin
  - /src/obj

Debugging

To debug the containerized application, you can:

  1. Attach a debugger to the running container
  2. Use remote debugging tools
  3. Check logs: docker-compose logs aiass

Production

For production deployment:

  1. Set ASPNETCORE_ENVIRONMENT=Production
  2. Use proper SSL certificates
  3. Configure health checks
  4. Set up monitoring and logging

Troubleshooting

Common Issues

  1. Port already in use: Change the port mappings in docker-compose.yml
  2. Build failures: Ensure all dependencies are properly restored
  3. Permission issues: Check file ownership and Docker user settings

Logs

View container logs:

docker-compose logs -f aiass

Cleanup

Remove containers and images:

docker-compose down
docker system prune -a

Security Notes

  • The container runs as a non-root user (appuser)
  • Only necessary ports are exposed
  • Environment variables can be overridden for different deployment scenarios