Compare commits

..

2 Commits

Author SHA1 Message Date
b7db53d93c Merge pull request 'Initial release' (#1) from initial into master 2020-06-07 12:38:03 +00:00
1baba1d841 Initial release
Some checks are pending
Tekton PR Pipeline
CI PR Checks...
2020-06-07 12:50:01 +01:00
4 changed files with 34 additions and 24 deletions

View File

@ -0,0 +1,17 @@
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

View File

@ -1,6 +1,6 @@
.DEFAULT_GOAL := default
IMAGE ?= docker.cloud.cluster.fun/private/REPO_NAME_LOWER:latest
IMAGE ?= docker.cluster.fun/averagemarcus/megasync:latest
.PHONY: test # Run all tests, linting and format checks
test: lint check-format run-tests
@ -8,42 +8,26 @@ test: lint check-format run-tests
.PHONY: lint # Perform lint checks against code
lint:
@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
check-format:
@echo "⚠️ 'check-format' unimplemented"
# GO Projects
# @gofmt -e -l .
.PHONY: format # Performs automatic format fixes on all code
format:
@echo "⚠️ 'format' unimplemented"
# GO Projects
# @gofmt -s -w .
.PHONY: run-tests # Runs all tests
run-tests:
@echo "⚠️ 'run-tests' unimplemented"
# GO Projects
# @go test
# Node Projects
# @npm test
.PHONY: fetch-deps # Fetch all project dependencies
fetch-deps:
@echo "⚠️ 'fetch-deps' unimplemented"
# GO Projects
# @go mod tidy
# Node Projects
# @npm install
.PHONY: build # Build the project
build: lint check-format fetch-deps
@echo "⚠️ 'build' unimplemented"
# GO Projects
# @go build -o PROJECT_NAME main.go
.PHONY: docker-build # Build the docker image
docker-build:
@ -56,10 +40,6 @@ docker-publish:
.PHONY: run # Run the application
run:
@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
ci:

View File

@ -1,14 +1,20 @@
# megasync
Run mega-sync as a Docker image
Run [mega-sync](https://mega.nz/sync) as a Docker image
## Features
## Install
* Keeps your MEGASync directory in your Mega account in sync with the `/home/mega` directory in the container
```sh
## Usage
```
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
@ -26,6 +32,9 @@ make build
## Resources
* [mega-sync](https://mega.nz/sync)
* [MEGAcmd](https://github.com/meganz/MEGAcmd)
## 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.

4
entrypoint.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
mega-login ${EMAIL} ${PASSWORD}
mega-sync ./ /MEGAsync
cat