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

Support for docker swarm services #660

Merged
merged 6 commits into from
Dec 17, 2022

Conversation

vinaydawani
Copy link
Contributor

This PR continues on the work already done in #449.

  • Following the advice at Basic support for Docker Swarm services #449 (comment), I added support for passing a boolean swarm variable from docker.yaml.
  • I also added checks before fallback kicks in to look for the swarm variable and proceed based on whether it's a truthy ot not.
  • I had to modify the getDockerArguments() function a bit. I tried to keep the changes minimal without altering the pattern too much.

I ran the test with an (already running) instance of portainer which was deployed with docker stack deploy -c ... portainer.

docker.yaml

---
# For configuration options and examples, please see:
# https://github.com/benphelps/homepage/wiki/Docker-Integration

# my-docker:
#   host: 127.0.0.1
#   port: 2375

swarm:
  socket: /var/run/docker.sock
  swarm: true

services.yaml

---
# For configuration options and examples, please see:
# https://github.com/benphelps/homepage/wiki/Services

- Network & Monitoring:
    - Portainer:
        href: http://192.168.1.52:9000/
        description: Docker container management
        icon: portainer.png
        ping: http://192.168.1.52:9000/
        server: swarm
        container: portainer_portainer

Building and running

npm run build

npm run start

Screen Shot 2022-12-11 at 4 06 12 AM

@shamoon
Copy link
Collaborator

shamoon commented Dec 11, 2022

Cool thanks. Can you cleanup the changes a bit just remove white space changes, squash

I also don’t use swarm but this should be easier to test when we have a moment

@shamoon
Copy link
Collaborator

shamoon commented Dec 11, 2022

Sweet thanks

@shamoon
Copy link
Collaborator

shamoon commented Dec 17, 2022

Awesome, finally had the chance to test this, works great. Will update the docs for this and should be able to get a release out soon-ish

@shamoon shamoon merged commit 7ca7a9c into gethomepage:main Dec 17, 2022
Copy link
Contributor

github-actions bot commented Feb 6, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants