wodby / drupal-php

PHP docker container image for Drupal
https://wodby.com/stacks/drupal
MIT License
60 stars 80 forks source link

Adding init_drupal to sudo-allowed commands #97

Closed esolitos closed 1 year ago

esolitos commented 1 year ago

Problem / Motivation

We use the container images in Amazon ECS and to setup the containers we use the provided init_drupal script when the container starts up, however to do so we had to include this command in the sudoers file.

Is there a rationale why /usr/local/bin/init_drupal was not included in /etc/sudoers.d/wodby like the other scripts in wodby/php?

csandanov commented 1 year ago

Your link shows init_container being included in sudoers file

esolitos commented 1 year ago

Oh sorry, I see now that I did a mistake in typing the issue. 😓 The correct script was init_drupal (as mentioned in the title) and not init_container, which as you say is already included. 😃

csandanov commented 1 year ago

it wasn't included in the base image because init_drupal added in the drupal-php image. Also it seems it doesn't require sudo permissions to do anything, otherwise we would update sudoers in the drupal-php

esolitos commented 1 year ago

You are absolutely right, not sure what was the issue I encountered 🤔 I can confirm that there is no need for sudo, I have used this successfully in several places.

thanks for the feedback.