generated from compsoc-edinburgh/deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change the working directory that the Docker container runs from
- Loading branch information
1 parent
4285fc3
commit 20a983b
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,14 +1,18 @@ | ||
FROM alpine | ||
|
||
# Create directory for the working directory slash cache | ||
RUN mkdir -p /etc/internal-wiki-notifier | ||
# Copy script which should be run | ||
COPY ./notify-wikijs-recent-updates.sh /usr/local/bin/notify-wikijs-recent-updates.sh | ||
RUN chmod +x /usr/local/bin/notify-wikijs-recent-updates.sh | ||
|
||
# Install curl and jq | ||
RUN apk add --no-cache curl jq | ||
|
||
WORKDIR /etc/internal-wiki-notifier | ||
|
||
# Run the cron every 5 minutes | ||
RUN echo '*/5 * * * * /usr/local/bin/notify-wikijs-recent-updates.sh' > /etc/crontabs/root | ||
RUN echo '*/5 * * * * cd /etc/internal-wiki-notifier && /usr/local/bin/notify-wikijs-recent-updates.sh' > /etc/crontabs/root | ||
|
||
# Run the cron with log level 2, and in foreground so it doesn't exit immediately | ||
CMD ["crond", "-l2", "-f"] |