Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allowing docker container to access service on host #2895

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

benquike
Copy link
Contributor

@benquike benquike commented Oct 18, 2024

What problem does this PR solve?

  1. The mysql_data path mapping in docker-compose-base.yml does not use local path,
    making mysql container unable to start, 44a9152 fixes it.
  2. services running (e.g., ollama) running on the host could not be accessed from docker containers

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

@@ -46,7 +46,7 @@ services:
ports:
- ${MYSQL_PORT}:3306
volumes:
- mysql_data:/var/lib/mysql
- ./mysql_data:/var/lib/mysql
Copy link
Member

@yuzhichang yuzhichang Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mysql_data is a volume defined later in this yaml. It's mounted from a docker managed directory.
In rare case if you want to mount from some specific host path, change the volume definion there for yourself.
Revert this chagne please.

@@ -29,3 +29,5 @@ services:
networks:
- ragflow
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yingfeng yingfeng added the ci Continue Integration label Oct 21, 2024
@yuzhichang yuzhichang changed the title allowing docker container to access service on host & fix my_sql_data path mapping allowing docker container to access service on host Oct 23, 2024
@yuzhichang
Copy link
Member

I reverted the change of mysql_data since there's no response from the author in 5 days.

@yuzhichang yuzhichang merged commit f090075 into infiniflow:main Oct 23, 2024
2 checks passed
Halfknow pushed a commit to Halfknow/ragflow that referenced this pull request Nov 11, 2024
### What problem does this PR solve?

1. services running (e.g., ollama) running on the host could not be
accessed from docker containers

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Zhichang Yu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continue Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants