Skip to content

Add cron as a global service #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

sagarnasit
Copy link
Contributor

@sagarnasit sagarnasit commented Jan 10, 2019

@sagarnasit sagarnasit requested a review from mrrobot47 January 10, 2019 13:59
@sagarnasit sagarnasit self-assigned this Jan 10, 2019
'image' => 'easyengine/cron:' . $img_versions['easyengine/cron'],
'restart' => 'always',
'volumes' => [
'/opt/easyengine/services/cron:/etc/ofelia:ro',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use function: EE_DOCKER::get_mounting_volume_array() as in all of above to generate volumes. As the volume generation differs in Linux and macOS.

For the volume /var/run/docker.sock - You can use skip_volume:

[
'name' => '/var/run/docker.sock',
'path_to_symlink' => '/var/run/docker.sock',
'container_path' => '/tmp/docker.sock:ro',
'skip_volume' => true,
],

Once, this change is done, for Linux systems, the cron directory inside the EE_SERVICE_DIR will be a docker volume. So, you'll have to write migrations to take backup of the previous cron directory and then once volume directory get's symlinked, need to restore that data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cron container in global docker compose
2 participants