Open Closed

Request for Guidance: Dockerizing Microservices in ABP.IO 8.3.1 with Angular, .NET 8, PostgreSQL #9874


User avatar
0
Yaduraj.Shakti created

Hello ABP.IO Support Team,

We are working with ABP.IO 8.3.1 in a microservices setup using:

  • Angular (frontend)
  • .NET 8 (backend microservices)
  • PostgreSQL + EF Core
  • Redis

We have WSL2 (Ubuntu) installed and are able to build container images for our services. However, we are facing issues running them properly with localhost access (e.g., API Gateway, IdentityServer, Angular UI).

Could you please guide us with:

  1. Downloading the correct template from ABP.IO for our use case.
  2. Recommended Dockerfile/Docker Compose setup for Angular + .NET + PostgreSQL + Redis in ABP.IO.
  3. Correct way to configure environment variables, connection strings, and networking so services can communicate properly in containers.
  4. Any best practices for Dockerizing ABP.IO microservices.

Our main blocker right now is running the containers and accessing them on localhost through WSL2. We don't have Docker desktop for now.

Thanks in advance for your help!

  • Exception message and full stack trace:
  • Steps to reproduce the issue:

1 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    1. To get started with ABP.IO microservices for your stack, use the official Microservice Startup Template. Download it with the ABP CLI:
    abp new Acme.BookStore -t microservice -u angular --database-provider postgresql
    

    This template includes .NET 8, Angular, PostgreSQL, Redis, and Docker support.

    1. The template provides sample Dockerfiles and a docker-compose.yml for all services (API Gateway, IdentityServer, microservices, Angular UI, PostgreSQL, Redis). After generating the solution, check the /docker folder and root docker-compose.yml. You can run all services with:
    docker compose up --build
    

    Make sure your docker-compose.yml exposes ports for API Gateway, IdentityServer, and Angular UI (e.g., 44300, 44301, 4200).

    1. Environment variables and connection strings are managed in docker-compose.override.yml and each service’s Dockerfile. For PostgreSQL and Redis, use service names as hostnames (e.g., Host=postgres; for PostgreSQL, Configuration=redis:6379 for Redis). ABP microservice templates use environment variables like ConnectionStrings__Default and Redis__Configuration for configuration. Example:
    environment:
      - ConnectionStrings__Default=Host=postgres;Port=5432;Database=abp;User Id=postgres;Password=yourpassword
      - Redis__Configuration=redis:6379
    

    All containers are on the same Docker network, so use service names (not localhost) for inter-service communication.

    1. Best practices:
      • Use the provided template and Docker Compose files as a base.
      • Always use Docker service names for connection strings.
      • Expose only necessary ports to your host.
      • For WSL2, access services via localhost:<exposed-port>.
      • Use .env files for secrets and environment-specific overrides.
      • For development, you can mount code as volumes for hot reload.

    If you have issues accessing services on localhost, ensure ports are published in docker-compose.yml and not blocked by firewalls. For WSL2, Docker’s networking is compatible with localhost access.

    Sources:

    • https://abp.io/docs/en/abp/latest/Startup-Templates/Microservice

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 10, 2025, 06:30