Skip to content
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
21 changes: 0 additions & 21 deletions .github/workflows/docker-build.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/mongo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build mongodb backup

on:
pull_request:
branches: [ "*" ]
paths: 'mongodb-backup/**'

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Generate container metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/deepak7340/mongodb-backup
tags: |
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
flavor: |
latest=false

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push container image
id: docker_build
uses: docker/build-push-action@v2
with:
file: "./mongodb-backup/Dockerfile"
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
61 changes: 0 additions & 61 deletions .github/workflows/mongodump-build.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/sealed-secret-build.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/sealed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build backup-sealed-secrets-keys

on:
pull_request:
branches: [ "*" ]
paths: 'backup-sealed-secrets-keys/**'

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Generate container metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/deepak7340/backup-sealed-secrets-keys
tags: |
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=ref,event=tag
flavor: |
latest=false

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build & push container image
id: docker_build
uses: docker/build-push-action@v2
with:
file: "./backup-sealed-secrets-keys/Dockerfile"
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
32 changes: 16 additions & 16 deletions mongodb-backup/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
FROM ubuntu:22.04@sha256:965fbcae990b0467ed5657caceaec165018ef44a4d2d46c7cdea80a9dff0d1ea

RUN apt-get -y update && apt-get -y install --no-install-recommends python3 python3-pymongo curl wget awscli gcc musl-dev python3-dev libffi-dev cargo make pip
#RUN apt-get -y update && apt-get -y install --no-install-recommends python3 python3-pymongo curl wget awscli gcc musl-dev python3-dev libffi-dev cargo make pip

RUN wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.6.1.deb -O /tmp/mongodb-tools.deb && \
dpkg -i /tmp/mongodb-tools.deb && \
rm /tmp/mongodb-tools.deb
#RUN wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.6.1.deb -O /tmp/mongodb-tools.deb && \
# dpkg -i /tmp/mongodb-tools.deb && \
# rm /tmp/mongodb-tools.deb

RUN pip install --upgrade pip
RUN pip install azure-cli
RUN mkdir /backup
#RUN pip install --upgrade pip
#RUN pip install azure-cli
RUN mkdir /backup /tiw

ENV S3_PATH=mongodb AWS_DEFAULT_REGION=us-east-1
#ENV S3_PATH=mongodb AWS_DEFAULT_REGION=us-east-1

COPY ./mongodb-backup/script/entrypoint.sh /usr/local/bin/entrypoint
COPY ./mongodb-backup/script/backup.sh /usr/local/bin/backup
COPY ./mongodb-backup/script/mongouri.py /usr/local/bin/mongouri
#COPY ./mongodb-backup/script/entrypoint.sh /usr/local/bin/entrypoint
#COPY ./mongodb-backup/script/backup.sh /usr/local/bin/backup
#COPY ./mongodb-backup/script/mongouri.py /usr/local/bin/mongouri

RUN chmod 775 /usr/local/bin/entrypoint
RUN chmod 775 /usr/local/bin/backup
RUN chmod 775 /usr/local/bin/mongouri
#RUN chmod 775 /usr/local/bin/entrypoint
#RUN chmod 775 /usr/local/bin/backup
#RUN chmod 775 /usr/local/bin/mongouri

VOLUME /backup
#VOLUME /backup

CMD /usr/local/bin/entrypoint
#CMD /usr/local/bin/entrypoint