generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Move to Dockerfile installation #32
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
Merged
tyler36
merged 18 commits into
ddev:main
from
tyler36:issue31_Move-to-Dockerfile-installation
Aug 31, 2023
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f66afd2
Move to Dockerfile installation
tyler36 2c3ceae
fix README typos
tyler36 bd3e3e8
Update readme
tyler36 602a7b9
Update README.md
tyler36 1757c98
Update README.md
tyler36 85e38e4
Update README.md
tyler36 092c9b3
Use `COPY` command because it's preferred
tyler36 6e871db
Dynamically add `.cron` files
tyler36 4ca42b3
Concatenate project cron jobs
tyler36 256ff7b
attempt to add cron jobs to current user
tyler36 28b7661
centralize health checks and example tests
tyler36 6986d00
Fix COPY command preventing multiple jobs
tyler36 67a48ac
Fix typo
tyler36 5aed29f
Remove repeated section
tyler36 a8ee0c5
Remove requirement statement
tyler36 642fe9a
Use `crontab -l` in example because it is simpler
tyler36 ebd76f6
Remove customize instructions
tyler36 2c2f87f
Remove extra line
tyler36 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,18 @@ | ||
| #ddev-generated | ||
| # Install cron package; this can be done in webimage_extra_packages, but put it here for now. | ||
| RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests cron | ||
| # Tell supervisord to start cron service in cron.conf | ||
| RUN echo " \n \ | ||
| [program:cron] \n \ | ||
| command=sudo /usr/sbin/cron -f -L7 \n \ | ||
| autorestart=true \n \ | ||
| startretries=10 \n \ | ||
| stdout_logfile=/proc/self/fd/2 \n \ | ||
| stdout_logfile_maxbytes=0 \n \ | ||
| redirect_stderr=true \n \ | ||
| " > /etc/supervisor/conf.d/cron.conf | ||
|
|
||
| # Copy our custom config | ||
| COPY ./cron.conf /etc/supervisor/conf.d/cron.conf | ||
|
|
||
| # Make it so you can add to cron.d without root privileges | ||
| RUN chmod 777 /etc/cron.d /var/run | ||
|
|
||
| # Copy over our custom jobs | ||
| COPY ./*.cron /etc/cron.d/ | ||
|
|
||
| # Give execution rights on the cron jobs | ||
| RUN chmod -f 0644 /etc/cron.d/*.cron || true | ||
|
|
||
| # Concatenate files | ||
| RUN { cat /etc/cron.d/*.cron; } | crontab -u ${username} - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #ddev-generated | ||
| [program:cron] | ||
| command=sudo /usr/sbin/cron -f -L7 | ||
| autorestart=true | ||
| startretries=10 | ||
| stdout_logfile=/proc/self/fd/2 | ||
| stdout_logfile_maxbytes=0 | ||
| redirect_stderr=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #ddev-generated | ||
| * * * * * date | tee -a /var/www/html/time.log |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.