How to deal with automatic capistrano symlinks and docker volumes

I’m looking for a way to work with docker and capistrano by changing less things in my deployment tasks as I can.

before, I ran the cap production deploy command and it connected to ssh, git cloned my project, created all symlinks for my shared folders between releases and executed my custom tasks.

  • Docker, How to replace capistrano tasks in docker
  • How to deploy using capistrano without current release symlink?
  • docker-compose : Issue with .env path
  • Updating a Symfony app with Docker-compose without losing data
  • Gitlab-ci configure docker runner for deployment with SSH keys
  • How to use Capistrano with Rails and Docker-compose?
  • The automatic symlinks were looking like that and depended each time on the deploy_to path:

    ln -s /home/railsproject/releases/20150105144249 /home/railsproject/current
    ln -s /home/railsproject/shared/public/uploads /home/railsproject/current/public/uploads

    Now, I’ll use a docker volume so files will be in different folders in my docker host but will always be in the same folder on different docker containers:

    ln -s /var/www/releases/20150105144249 /home/railsproject/current
    ln -s /var/www/shared/public/uploads /home/railsproject/current/public/uploads

    How can I override the way capistrano is making its symbolic links so I’ll always use my base folder /var/www/ to create symlinks even if capistrano will publish to /home/railsproject folder ?

    Maybe do you have a better way to create those symlinks or simply something else in mind ?

  • Create docker image from Artifactory
  • Cloning GitHub private repository with Docker container non-root user?
  • Vmstateevent invalid json error installing docker on mac Sierra
  • Solr on Docker:localhost:8983 not working
  • Deploy Meteor 1.3, React app on AWS
  • Less awkward method of using all available CPUs in Docker container:
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.