Skip to content

Commit

Permalink
update Docker Compose configuration and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
viperadnan-git committed Feb 6, 2024
1 parent 9cac946 commit 8f7e660
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rclone.conf
rclone.conf
.env
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker run \
-e RCLONE_REMOTE=myremote \
-e RCLONE_REMOTE_PATH=/path/to/remote \
-e MONGO_URI=mongodb://myuser:xxxxxxxxxx@xxxxxx:27017/mydb \
-v $HOME/.config/rclone:/config/rclone:ro \
-v $HOME/.config/rclone:/config/rclone \
--rm \
-it \
mongodump-rclone
Expand All @@ -40,7 +40,7 @@ services:
- RCLONE_REMOTE_PATH=/path/to/remote
- MONGO_URI=mongodb://myuser:xxxxxxxxxx@xxxxxx:27017/mydb
volumes:
- /home/user/.config/rclone:/config/rclone:ro
- /home/user/.config/rclone:/config/rclone
mongoexport:
image: mongodump-rclone
environment:
Expand All @@ -51,7 +51,7 @@ services:
- RCLONE_REMOTE_PATH=/path/to/remote
- MONGO_URI=mongodb://myuser:xxxxxxxxxx@xxxxxx:27017/mydb
volumes:
- /home/user/.config/rclone:/config/rclone:ro
- /home/user/.config/rclone:/config/rclone
```
Run the following command to start the services.
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- RCLONE_REMOTE_PATH=/path/to/remote
- MONGO_URI=mongodb://myuser:xxxxxxxxxx@xxxxxx:27017/mydb
volumes:
- /home/user/.config/rclone:/config/rclone:ro
- /home/user/.config/rclone:/config/rclone
mongoexport:
image: mongodump-rclone
environment:
Expand All @@ -19,4 +19,4 @@ services:
- RCLONE_REMOTE_PATH=/path/to/remote
- MONGO_URI=mongodb://myuser:xxxxxxxxxx@xxxxxx:27017/mydb
volumes:
- /home/user/.config/rclone:/config/rclone:ro
- /home/user/.config/rclone:/config/rclone
6 changes: 3 additions & 3 deletions mongodump-rclone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RCLONE_REMOTE=${RCLONE_REMOTE:-"default"}

if [ ! -f "$RCLONE_CONFIG_FILE" ]; then
echof "rclone.conf file does not exist, creating it ($RCLONE_CONFIG_FILE)"
mkdir -p ~/.config/rclone
echof "[$RCLONE_REMOTE]" >$RCLONE_CONFIG_FILE
echof -e "$RCLONE_CONFIG" >>$RCLONE_CONFIG_FILE
mkdir -p "$(dirname $RCLONE_CONFIG_FILE)"
echo "[$RCLONE_REMOTE]" >$RCLONE_CONFIG_FILE
echo "$RCLONE_CONFIG" >>$RCLONE_CONFIG_FILE
fi

RCLONE_ARGS=${RCLONE_ARGS:-""}
Expand Down
6 changes: 3 additions & 3 deletions mongoexport-rclone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RCLONE_REMOTE=${RCLONE_REMOTE:-"default"}

if [ ! -f "$RCLONE_CONFIG_FILE" ]; then
echof "rclone.conf file does not exist, creating it ($RCLONE_CONFIG_FILE)"
mkdir -p ~/.config/rclone
echof "[$RCLONE_REMOTE]" >$RCLONE_CONFIG_FILE
echof -e "$RCLONE_CONFIG" >>$RCLONE_CONFIG_FILE
mkdir -p "$(dirname $RCLONE_CONFIG_FILE)"
echo "[$RCLONE_REMOTE]" >$RCLONE_CONFIG_FILE
echo "$RCLONE_CONFIG" >>$RCLONE_CONFIG_FILE
fi

RCLONE_ARGS=${RCLONE_ARGS:-""}
Expand Down

0 comments on commit 8f7e660

Please sign in to comment.