This repository was archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
Add network to docker containers #43
Copy link
Copy link
Open
Description
I am testing/trying out fiber from my local machine. I am looking to use fiber processes to do a side-effect job (put data into databases) and use docker as the fiber backend. For testing, i have elasticsearch and postgress running in docker containers in a docker network called test.
I would like to pass network name as a parameter (just like the docker image) to the process running the docker container.
I tried it out locally and it works for me. This is the modification i made to the docker_backend.py file:
81 try:
82 container = self.client.containers.run(
83 image,
84 job_spec.command,
85 name=job_spec.name + '-' + str(uuid.uuid4()),
86 volumes=volumes,
87 cap_add=["SYS_PTRACE"],
88 tty=tty,
89 stdin_open=stdin_open,
**90 network="test",**
91 detach=True
I am not sure how to pass the network in as a parameter. Possibly via job_spec ?
Questions:
- Is it recommend to use Fiber process to do
side-effectjobs, specifically use it and insert data into database?
If i have 5 places i want to put the data in (elasticsearch, redis-stream, postgress, other-places), is it recommend to use 5 fiber processes to insert data into the respective "databases"
Metadata
Metadata
Assignees
Labels
No labels