Skip to content
New issue

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

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

Already on GitHub? # to your account

Kdo 2628 #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Pull base image.
FROM dtr.cucloud.net/cs/s3sync
FROM 078742956215.dkr.ecr.us-east-1.amazonaws.com/kuali/base

USER root
RUN mkdir /sync
# Install python and pip
RUN \
apt-get update && \
apt-get install -y python python-pip jq && \
rm -rf /var/lib/apt/lists/*

# Install AWS CLI tools
RUN pip install awscli

RUN groupadd -g 7070 tcadm
RUN useradd -u 105 -g 7070 tomcat7
Expand Down
9 changes: 6 additions & 3 deletions sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ def up_sync
puts `aws s3 sync /sync s3://#{ENV['S3_BUCKET']}`
end

def dn_sync
puts `aws s3 sync s3://#{ENV['S3_BUCKET']} /sync`
end

def sync
start = Time.now
Expand All @@ -31,10 +34,10 @@ def sync
sync {up_sync}
end


if (ONCE)
break
if DIRECTION.eql?("DN")
sync {dn_sync}
end


sleep SLEEP_SECONDS
end