Skip to content

Commit

Permalink
added local minio s3 and backup:mongodb script (#649)
Browse files Browse the repository at this point in the history
* added local minio s3 and backup:mongodb script

* included metadata.json files to backup

* added download code

* added lifecycle and changed config names

* removed minio container, added lifecycle rule check

---------

Co-authored-by: ARtheboss <advayratan@yahoo.com>
  • Loading branch information
2 people authored and maxmwang committed Jul 22, 2024
1 parent 0759ab3 commit 515a038
Show file tree
Hide file tree
Showing 8 changed files with 544 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ SIS_COURSE_APP_KEY=_
GOOGLE_CLIENT_ID=_
GOOGLE_CLIENT_SECRET=_
SESSION_SECRET=_

S3_ENDPOINT=minio
S3_PORT=9000
S3_ACCESS_KEY_ID=root
S3_SECRET_ACCESS_KEY=password
S3_MONGO_BACKUP_BUCKET=mongo-backup
6 changes: 6 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
FROM node:16.14.2-slim AS builder
RUN mkdir /backend
WORKDIR /backend
RUN apt-get update \
&& apt-get install -y wget \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu1804-arm64-100.9.0.deb && \
apt-get -y install ./mongodb-database-tools-*100.9.0.deb && \
rm -f mongodb-database-tools-*.deb
COPY package.json .
RUN npm install --prefer-offline --no-audit
COPY . .
Expand Down
Loading

0 comments on commit 515a038

Please sign in to comment.