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

fix docker-compose setup #1198

Closed

Conversation

edcohen08
Copy link
Contributor

@edcohen08 edcohen08 commented Apr 13, 2023

Background

Earlier today #836 was merged in but I think it needed an update to the readme for explanation and a tweak to the docker-compose.yml for clarity.

Changes

Added container_name: "redis-stack-server" on the redis container so it's easy to drop into the env.
Updated the readme with steps for running the docker-compose + redis.

Documentation

Updated the readme.

Test Plan

Have tested locally - this is the failure before changes -- LIGHT MODE WARNING
Screen Shot 2023-04-13 at 6 04 17 PM

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@edcohen08 edcohen08 changed the title add container name, update readme fix docker-compose setup Apr 13, 2023
@@ -14,3 +14,4 @@ services:

redis:
image: "redis/redis-stack-server:latest"
container_name: "redis-stack-server"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand why this is necessary? What is wrong with the default name of redis?

Copy link

Choose a reason for hiding this comment

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

@mikekelly I have same question.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing wrong with it, I could've used redis but in my local testing the image doesn't spin up as redis it's like auto-gpt-redis-1. I could change this to redis but I think specifying a name is useful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just so that there's something consistent people can put in their .env for the host

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoop my mistake, no need to specify the name. I at least think the readme update is useful and can modify the readme or close the pr

Copy link

Choose a reason for hiding this comment

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

A specific name instead of a generic name helps avoid conflicts and/or confusion when multiple Redis containers may be running on the same host.

As a best practice, it's better to be specific than generic, especially when you can have OSS Redis, the standard engine; Redis Stack extension with builtin RedisInsight for Dev; and Redis Stack Server, the extension without RedisInsight for Production.

As convention, using the origin product name plus optional specific identifiers helps any new comers and avoids misunderstandings.

Copy link
Contributor

Choose a reason for hiding this comment

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

@aosan if you decide to go in that direction, you're still better off achieving this through the name of the service. Docker compose provides a network where the containers can address each other via their service name.

@nponeccop nponeccop mentioned this pull request Apr 14, 2023
1 task
nponeccop
nponeccop previously approved these changes Apr 15, 2023
README.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to docker-compose. Revert.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops auto formatted the readme in the rebase

@@ -14,3 +14,4 @@ services:

redis:
Copy link
Contributor

Choose a reason for hiding this comment

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

This service can be renamed to redis-stack-server and then there's is no need to specify the container_name

@nponeccop nponeccop mentioned this pull request Apr 16, 2023
1 task
@nponeccop nponeccop added the B6 label Apr 16, 2023
@p-i-
Copy link
Contributor

p-i- commented Apr 17, 2023

Do we have consensus agreement from the discussion? Hard to see for me...

@p-i- p-i- added the needs discussion To be discussed among maintainers label Apr 17, 2023
@mikekelly
Copy link
Contributor

@p-i- The renaming of the container to make it more descriptive can be solved like so: #2202

@nponeccop nponeccop mentioned this pull request Apr 17, 2023
1 task
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 22, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@Pwuts
Copy link
Member

Pwuts commented Apr 26, 2023

The change to docker-compose.yml is not necessary (see #1843), and the docs already contain the proposed info. :)

@Pwuts Pwuts closed this Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Automatically applied to PRs with merge conflicts needs discussion To be discussed among maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants