Compare commits
No commits in common. "b7db53d93c07acc1b3afe605630879b718d59c97" and "313dacf0f930fcbd512d0412c65715998c8c6951" have entirely different histories.
b7db53d93c
...
313dacf0f9
17
Dockerfile
17
Dockerfile
@ -1,17 +0,0 @@
|
|||||||
FROM ubuntu:19.10
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y curl
|
|
||||||
RUN curl -o megacmd-xUbuntu_19.10_amd64.deb https://mega.nz/linux/MEGAsync/xUbuntu_19.10/amd64/megacmd-xUbuntu_19.10_amd64.deb
|
|
||||||
RUN apt install -y ./megacmd-xUbuntu_19.10_amd64.deb
|
|
||||||
|
|
||||||
ADD entrypoint.sh /
|
|
||||||
|
|
||||||
RUN adduser --disabled-password --gecos '' mega && adduser mega sudo && echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
||||||
USER mega
|
|
||||||
|
|
||||||
WORKDIR /home/mega
|
|
||||||
|
|
||||||
ENV PASSWORD=
|
|
||||||
ENV EMAIL=
|
|
||||||
|
|
||||||
CMD /entrypoint.sh
|
|
22
Makefile
22
Makefile
@ -1,6 +1,6 @@
|
|||||||
.DEFAULT_GOAL := default
|
.DEFAULT_GOAL := default
|
||||||
|
|
||||||
IMAGE ?= docker.cluster.fun/averagemarcus/megasync:latest
|
IMAGE ?= docker.cloud.cluster.fun/private/REPO_NAME_LOWER:latest
|
||||||
|
|
||||||
.PHONY: test # Run all tests, linting and format checks
|
.PHONY: test # Run all tests, linting and format checks
|
||||||
test: lint check-format run-tests
|
test: lint check-format run-tests
|
||||||
@ -8,26 +8,42 @@ test: lint check-format run-tests
|
|||||||
.PHONY: lint # Perform lint checks against code
|
.PHONY: lint # Perform lint checks against code
|
||||||
lint:
|
lint:
|
||||||
@echo "⚠️ 'lint' unimplemented"
|
@echo "⚠️ 'lint' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @go vet && golint -set_exit_status ./...
|
||||||
|
|
||||||
.PHONY: check-format # Checks code formatting and returns a non-zero exit code if formatting errors found
|
.PHONY: check-format # Checks code formatting and returns a non-zero exit code if formatting errors found
|
||||||
check-format:
|
check-format:
|
||||||
@echo "⚠️ 'check-format' unimplemented"
|
@echo "⚠️ 'check-format' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @gofmt -e -l .
|
||||||
|
|
||||||
.PHONY: format # Performs automatic format fixes on all code
|
.PHONY: format # Performs automatic format fixes on all code
|
||||||
format:
|
format:
|
||||||
@echo "⚠️ 'format' unimplemented"
|
@echo "⚠️ 'format' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @gofmt -s -w .
|
||||||
|
|
||||||
.PHONY: run-tests # Runs all tests
|
.PHONY: run-tests # Runs all tests
|
||||||
run-tests:
|
run-tests:
|
||||||
@echo "⚠️ 'run-tests' unimplemented"
|
@echo "⚠️ 'run-tests' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @go test
|
||||||
|
# Node Projects
|
||||||
|
# @npm test
|
||||||
|
|
||||||
.PHONY: fetch-deps # Fetch all project dependencies
|
.PHONY: fetch-deps # Fetch all project dependencies
|
||||||
fetch-deps:
|
fetch-deps:
|
||||||
@echo "⚠️ 'fetch-deps' unimplemented"
|
@echo "⚠️ 'fetch-deps' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @go mod tidy
|
||||||
|
# Node Projects
|
||||||
|
# @npm install
|
||||||
|
|
||||||
.PHONY: build # Build the project
|
.PHONY: build # Build the project
|
||||||
build: lint check-format fetch-deps
|
build: lint check-format fetch-deps
|
||||||
@echo "⚠️ 'build' unimplemented"
|
@echo "⚠️ 'build' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @go build -o PROJECT_NAME main.go
|
||||||
|
|
||||||
.PHONY: docker-build # Build the docker image
|
.PHONY: docker-build # Build the docker image
|
||||||
docker-build:
|
docker-build:
|
||||||
@ -40,6 +56,10 @@ docker-publish:
|
|||||||
.PHONY: run # Run the application
|
.PHONY: run # Run the application
|
||||||
run:
|
run:
|
||||||
@echo "⚠️ 'run' unimplemented"
|
@echo "⚠️ 'run' unimplemented"
|
||||||
|
# GO Projects
|
||||||
|
# @go run main.go
|
||||||
|
# Node Projects
|
||||||
|
# @npm start
|
||||||
|
|
||||||
.PHONY: ci # Perform CI specific tasks to perform on a pull request
|
.PHONY: ci # Perform CI specific tasks to perform on a pull request
|
||||||
ci:
|
ci:
|
||||||
|
15
README.md
15
README.md
@ -1,20 +1,14 @@
|
|||||||
# megasync
|
# megasync
|
||||||
|
|
||||||
Run [mega-sync](https://mega.nz/sync) as a Docker image
|
Run mega-sync as a Docker image
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Keeps your MEGASync directory in your Mega account in sync with the `/home/mega` directory in the container
|
## Install
|
||||||
|
|
||||||
## Usage
|
```sh
|
||||||
|
|
||||||
```
|
```
|
||||||
docker run -d \
|
|
||||||
-e EMAIL=YOUR_MEGA_ACCOUNT_EMAIL \
|
|
||||||
-e PASSWORD=YOUR_MEGA_PASSWORD \
|
|
||||||
-v /path/to/sync:/home/mega \
|
|
||||||
docker.cluster.fun/averagemarcus/megasync
|
|
||||||
```
|
|
||||||
|
|
||||||
## Building from source
|
## Building from source
|
||||||
|
|
||||||
@ -32,9 +26,6 @@ make build
|
|||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
* [mega-sync](https://mega.nz/sync)
|
|
||||||
* [MEGAcmd](https://github.com/meganz/MEGAcmd)
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
If you find a bug or have an idea for a new feature please [raise an issue](/AverageMarcus/megasync/issues/new) to discuss it.
|
If you find a bug or have an idea for a new feature please [raise an issue](/AverageMarcus/megasync/issues/new) to discuss it.
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
mega-login ${EMAIL} ${PASSWORD}
|
|
||||||
mega-sync ./ /MEGAsync
|
|
||||||
cat
|
|
Loading…
Reference in New Issue
Block a user