Search code examples
dockerubuntuuser-interfaceprefect

How can I run two different prefect projects on the same server?


I have two different projects and I want to run both projects in separate urls.

For example, one project should run at 127.0.0.1:8080 while the other project should run at 127.0.0.1:8081

I created different docker-compose.yml for prefect containers and gave different ports.I created the containers but I can't access it except port 8080.

Is it possible to run two different prefect projects on the same server?


Solution

  • In my opinion, you should define port in docker compose file Example:

    service:
     container1:
        image: xxx
        container_name: xxx
        ports:
          - "8080:3307"
    
    service:
     container2:
        image: yyy
        container_name: yyy
        ports:
          - "8081:3307"