[GH-ISSUE #3777] recommend adding a docker-compose.yaml file #13380

Closed
opened 2026-04-19 20:08:37 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @Hisma on GitHub (Jul 11, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3777

many of us run multiple docker containers and like to organize in a docker-compose file. Here is the docker command I run to run open-webui -
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --network=host --restart always ghcr.io/open-webui/open-webui:cuda

here it is in docker-compose format -

Here's the Docker Compose equivalent of the provided Docker run command:

version: '3.8'

services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:cuda
    container_name: open-webui
    ports:
      - "3000:8080"
    volumes:
      - open-webui:/app/backend/data
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    extra_hosts:
      - "host.docker.internal:host-gateway"
    network_mode: host
    restart: always

volumes:
  open-webui:

note - I need to use the option network_mode: host for some reason. Others may not need this so it can be commented out by default.

I think others will find this useful and it can be added as an additional file for those who prefer to orchestrate docker containers using docker compose.

Originally created by @Hisma on GitHub (Jul 11, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/3777 many of us run multiple docker containers and like to organize in a docker-compose file. Here is the docker command I run to run open-webui - ``docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --network=host --restart always ghcr.io/open-webui/open-webui:cuda`` here it is in docker-compose format - Here's the Docker Compose equivalent of the provided Docker run command: ```yaml version: '3.8' services: open-webui: image: ghcr.io/open-webui/open-webui:cuda container_name: open-webui ports: - "3000:8080" volumes: - open-webui:/app/backend/data deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] extra_hosts: - "host.docker.internal:host-gateway" network_mode: host restart: always volumes: open-webui: ``` note - I need to use the option `network_mode: host` for some reason. Others may not need this so it can be commented out by default. I think others will find this useful and it can be added as an additional file for those who prefer to orchestrate docker containers using `docker compose`.
Author
Owner

@Hisma commented on GitHub (Jul 11, 2024):

closing this. I see it's already been done! Perhaps mention in the installation guide that alternatively users can use the docker-compose version...

<!-- gh-comment-id:2221849610 --> @Hisma commented on GitHub (Jul 11, 2024): closing this. I see it's already been done! Perhaps mention in the installation guide that alternatively users can use the docker-compose version...
Author
Owner

@justinh-rahb commented on GitHub (Jul 11, 2024):

closing this. I see it's already been done! Perhaps mention in the installation guide that alternatively users can use the docker-compose version...

That's also already mentioned: https://docs.openwebui.com/getting-started/#docker-compose

<!-- gh-comment-id:2223637741 --> @justinh-rahb commented on GitHub (Jul 11, 2024): > closing this. I see it's already been done! Perhaps mention in the installation guide that alternatively users can use the docker-compose version... That's also already mentioned: https://docs.openwebui.com/getting-started/#docker-compose
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13380