Define two parts: preparation and application deployment.
Move docker installation to preparation part. Preparation script should be idempotent as much as possible: first check if docker is installed, and then install it if necessary.
Between preparation and deployment step there should be one manual action: adding bots keys, probably the best they is to set them via ENV variables instead of placing on fs:
export SEARCH_BOT_KEY="2432423:32423432"
export EDITOR_BOT_KEY="324324234:324324"
In this case application deployment step should contain: checking ENV vars, permissions, packages, etc; and docker-compose up.
Define two parts: preparation and application deployment.
Move docker installation to preparation part. Preparation script should be idempotent as much as possible: first check if docker is installed, and then install it if necessary. Between preparation and deployment step there should be one manual action: adding bots keys, probably the best they is to set them via ENV variables instead of placing on fs: export SEARCH_BOT_KEY="2432423:32423432" export EDITOR_BOT_KEY="324324234:324324"
In this case application deployment step should contain: checking ENV vars, permissions, packages, etc; and docker-compose up.