-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from BCDevOps/mongo
Add support for Mongo
- Loading branch information
Showing
26 changed files
with
2,480 additions
and
1,577 deletions.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This image provides a mongo installation from which to run backups | ||
FROM registry.access.redhat.com/rhscl/mongodb-36-rhel7 | ||
|
||
# Change timezone to PST for convenience | ||
ENV TZ=PST8PDT | ||
|
||
# Set the workdir to be root | ||
WORKDIR / | ||
|
||
# Load the backup scripts into the container (must be executable). | ||
COPY backup.* / | ||
|
||
COPY webhook-template.json / | ||
|
||
# ======================================================================================================== | ||
# Install go-crond (from https://github.com/BCDevOps/go-crond) | ||
# - Adds some additional logging enhancements on top of the upstream project; | ||
# https://github.com/webdevops/go-crond | ||
# | ||
# CRON Jobs in OpenShift: | ||
# - https://blog.danman.eu/cron-jobs-in-openshift/ | ||
# -------------------------------------------------------------------------------------------------------- | ||
ARG SOURCE_REPO=BCDevOps | ||
ARG GOCROND_VERSION=0.6.3 | ||
ADD https://github.com/$SOURCE_REPO/go-crond/releases/download/$GOCROND_VERSION/go-crond-64-linux /usr/bin/go-crond | ||
|
||
USER root | ||
|
||
RUN chmod ug+x /usr/bin/go-crond | ||
# ======================================================================================================== | ||
|
||
# ======================================================================================================== | ||
# Perform operations that require root privilages here ... | ||
# -------------------------------------------------------------------------------------------------------- | ||
RUN echo $TZ > /etc/timezone | ||
# ======================================================================================================== | ||
|
||
# Important - Reset to the base image's user account. | ||
USER 26 | ||
|
||
# Set the default CMD. | ||
CMD sh /backup.sh |
Oops, something went wrong.