Skip to content

Commit bd8ed77

Browse files
committed
comments and readme updated
1 parent 1ab25a0 commit bd8ed77

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# System Files
1+
# Exclude system files
22
.DS_Store
33

4-
# NPM Modules
4+
# Exclude Node modules
55
node_modules/
66

7-
# Environment Variables File
7+
# Exclude the environment variables
88
.env

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# User lightwight base image
1+
# Use a lightweight base image
22
FROM node:20.9.0-alpine
33

44
# Install Git
55
RUN apk add --no-cache git
66

7-
# Define work directory
7+
# Define the work directory
88
WORKDIR /usr/src/app
99

10-
# Copy package definition
10+
# Copy the package definition
1111
COPY package*.json ./
1212

13-
# Install dependencies
13+
# Install all dependencies
1414
RUN npm install
1515

16-
# Copy source files
16+
# Copy the source files
1717
COPY . .
1818

19-
# Start backup script
19+
# Start the backup script
2020
CMD ["node", "index.js"]

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1+
# Include the environment variables
12
include ./.env
23

4+
# Run the Docker image and attach the environment file
35
docker_run: docker_build
46
docker run --rm --name github-backup -v $(FOLDER):/usr/src/backup --env-file ./.env github-backup
57

8+
# Build the Docker image
69
docker_build: docker_cleanup
710
docker build -t github-backup .
811

12+
# Cleanup Docker
913
docker_cleanup:
1014
docker stop github-backup || true
1115
docker rm github-backup || true

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,11 @@ Creates a local backup of your GitHub data.
44

55
## In Scope
66

7-
- ✅ Repositories: cloned, public and private ones, images from markdown files
7+
- ✅ Repositories: cloned, public and private ones
88
- ✅ Releases: including images and assets
99
- ✅ Issues: including comments and images, open and closed ones
10-
- ✅ User: details and starred repositories
11-
12-
## In Progress
13-
- ⏳ Repositories: attachments from markdown files
14-
- ⏳ Releases: attachments
15-
- ⏳ Issues: attachments
16-
- ⏳ Projects v1: related to repositories, users and organizations
17-
- ⏳ Projects v2
10+
- ✅ Markdown: images, uploaded to the GitHub editor
11+
- ✅ User: user details and starred repositories
1812

1913
## Usage
2014

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const retryDelayRateLimit = 6 * 60
1313
const retryDelayOthers = 6
1414

1515
const { USERNAME, TOKEN } = process.env
16-
const folder = '/usr/src/backup'
16+
const folder = '/usr/src/backup' // Will be deleted entirely!
1717

1818
function delay(seconds) {
1919
return new Promise(resolve => {
@@ -281,4 +281,5 @@ async function backup() {
281281
}
282282
}
283283

284+
// Run the backup
284285
backup()

0 commit comments

Comments
 (0)