We propose to create a shell script to install Decidim based on docker images.
It could be executed as:
curl -sSL [<https://decidim.org/install.sh>](<https://decidim.org/install.sh>) | sh
Ideally, it should handle (although the final specification would depend on the available hours):
- Detect the current system where it is installed (for instance inside a LXC/Proxmox container?)
- Check if Docker is installed (maybe can handle the installation of Docker itself if necessary as this process can be easily automated thanks to the get.docker.com)
- Ask several questions to the user installing, for instance, the host name, the first admin (that could be also the system user), the docker image, whether to use let’s encrypt, etc.
- Check for the current internet access, if the IP is public or if the provided host name points to the current server
- Create a directory and some files in it, mainly a docker-compose.yml and maybe some other auxiliary ones (like an .env file, a subdirectory for storage, or a subdirectory where to store SSL certificates)
- Handle updates in case of executing the script again
- Handle rollbacks if the update goes wrong
NOTES & QUESTIONS
- Traefik could be used as a proxy to handle let’s encrypt and maybe in future updates zero downtime deployments.
- How to handle cron jobs (maybe a dedicated container or use sidekiq-cron or solid queue (but this requires modification of the Gemfile)
- How to handle cloud file systems (maybe just skip that for the moment, assume local files)
- How to handle database backups (this can be automated easily with a dedicated container)