Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ services:
- st2api
networks:
- private
environment:
- SSH_AUTH_SOCK=/ssh-agent
volumes:
- /run/host-services/ssh-auth.sock:/ssh-agent
Copy link
Member

Choose a reason for hiding this comment

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

Can you do something more generic?
On my linux box I have something like:
SSH_AUTH_SOCK=/tmp/ssh-XXXXXXs4KUHi/agent.1234

So, is there a way to avoid hard-coding this path?

Copy link
Member

Choose a reason for hiding this comment

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

I don't know docker-compose very well, but would something like this work?

Suggested change
- /run/host-services/ssh-auth.sock:/ssh-agent
- ${SSH_AUTH_SOCK:-/run/host-services/ssh-auth.sock}:/ssh-agent

Copy link
Member

Choose a reason for hiding this comment

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

+1.

Another thought is how to make it optional?

I'm thinking that majority of the users might not need these volume mounts by default
So we avoid sharing the ssh auth socket with st2 unless configured.

- ./files/st2.docker.conf:/etc/st2/st2.docker.conf:ro
- ./files/st2.user.conf:/etc/st2/st2.user.conf:ro
- stackstorm-packs-configs:/opt/stackstorm/configs:rw
Expand Down