jjethwa / rundeck

GNU General Public License v3.0
123 stars 137 forks source link

Rundeck as a Docker service #96

Closed happicamper closed 6 years ago

happicamper commented 6 years ago

Hello, I'm having trouble running Rundeck Docker using Docker Swarm, it keeps on overriding my realm.properties and rundeck-config.properties to default values even though I mounted local directory using --mount command. Here's my run command:

docker service create \
  -t \
  --env SERVER_URL=https://my-rundeck.com \
  --env RUNDECK_WITH_SSL=true \
  --publish 7443:4443 \
  --mount type=bind,source=/etc/rundeck,destination=/etc/rundeck \
  --mount type=bind,source=/var/rundeck,destination=/var/rundeck \
  --mount type=bind,source=/var/lib/rundeck,destination=/var/lib/rundeck/.ssh \
  --mount type=bind,source=/var/lib/mysql,destination=/var/lib/mysql \
  --mount type=bind,source=/var/log/rundeck,destination=/var/log/rundeck \
  --mount type=bind,source=/opt/rundeck-plugins,destination=/opt/rundeck-plugins \
  --mount type=bind,source=/var/lib/rundeck/var/storage,destination=/var/lib/rundeck/var/storage \
  --mount type=bind,source=/etc/localtime,destination=/etc/localtime:ro \
  --name=my-rundeck \
  jordan/rundeck

Other files that I have created are present in the directory of the service such as *.aclpolicy. It's just that those default files are going back to default every time I deployed the service. By the way, I'm using the latest version of rundeck docker image.

jjethwa commented 6 years ago

Hi @happicamper

Thanks for reporting the issue. I'm making a change right now that will only copy over the default configs if /etc/rundeck is completely empty.

jjethwa commented 6 years ago

Commit: https://github.com/jjethwa/rundeck/commit/7aff6f6e74da57030be91717e54797b1b2024949

latest is building now πŸ˜„

happicamper commented 6 years ago

Hi again @jjethwa And I think I have to change the SERVER_URL to EXTERNAL_SERVER_URL right?
Sorry because these mounts are from 3 months ago (2.9.3) version that's why I'm still using SERVER_URL parameter πŸ˜„ Thank you so much!

jjethwa commented 6 years ago

Hi @happicamper

That's correct, you'll need to switch SERVER_URL to EXTERNAL_SERVER_URL and you should be good to go. I'll let you know when latest is ready. Should be another few minutes for it to build on Docker Hub and a few minutes for me to test out the changes πŸ˜„

jjethwa commented 6 years ago

@happicamper You should be good to go with latest now, let me know πŸ˜„

happicamper commented 6 years ago

@jjethwa No problem buddy! It's a relief to know that there's solution for this. , I thought I will never get this running again in Docker swarmπŸ˜„

jjethwa commented 6 years ago

:crossed_fingers: hehe

happicamper commented 6 years ago

@jjethwa works perfectly! thanks!