Working dockerization
This commit is contained in:
parent
5658790edd
commit
0fed6f0c6e
4 changed files with 40 additions and 7 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
archivist.yml
|
14
Dockerfile
Normal file
14
Dockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
FROM debian:stable
|
||||
|
||||
RUN apt-get update && apt-get install -y python3-pip && apt-get clean && pip3 install pipenv
|
||||
|
||||
VOLUME /backups
|
||||
|
||||
COPY . /archivist
|
||||
|
||||
WORKDIR /archivist
|
||||
|
||||
RUN pipenv install
|
||||
|
||||
CMD /archivist/bin/archivist.sh backup
|
||||
|
|
@ -12,7 +12,7 @@ if None != os.environ.get("XDG_CONFIG_HOME"):
|
|||
config_locations.append(Path(os.environ.get("XDG_CONFIG_HOME")) / "archivist/archivist.yml")
|
||||
config_locations.append(Path.home() / ".config/archivist/archivist.yml")
|
||||
config_locations.append(Path.home() / ".archivist.yml")
|
||||
config_locations.append(Path("/etc/archivist.yml"))
|
||||
config_locations.append(Path("/etc/archivist/archivist.yml"))
|
||||
|
||||
got_config = False
|
||||
i = 0
|
||||
|
|
30
readme.md
30
readme.md
|
@ -1,10 +1,24 @@
|
|||
# Archivist
|
||||
|
||||
The archivist is run from a either a central `archivist.py` script
|
||||
The archivist is run from a either a `archivist.py` script or a Docker container.
|
||||
|
||||
Running `./archivist.py` alone will back up all configured services.
|
||||
## Script Use
|
||||
Running `bin/archivist.sh` alone will back up all configured services.
|
||||
|
||||
You can also back up a single service by running `./archivist.py backup service`
|
||||
You can also back up a single service by running `bin/archivist.sh backup service`
|
||||
|
||||
## Docker Use
|
||||
|
||||
The docker container needs two volumes, one mounted wherever you store the backups and
|
||||
the other at `/archivist/archivist.yml` for the config file.
|
||||
|
||||
Example:
|
||||
```bash
|
||||
docker run --rm \
|
||||
-v /home/host-user/host_backup_dir:/backups \
|
||||
-v /home/host-user/archivist_config.yml:/archivist/archivist.yml \
|
||||
amdavidson/archivist
|
||||
```
|
||||
|
||||
|
||||
## Configuring the Archivist
|
||||
|
@ -19,6 +33,13 @@ services:
|
|||
service_type: github
|
||||
backup_folder: /home/user/backups/github
|
||||
user: gh-user
|
||||
token: 0xDEADBEEF
|
||||
disable_repos: False
|
||||
disable_gists: False
|
||||
repo_backup_list:
|
||||
- important-repository
|
||||
gist_backup_list
|
||||
- 1337
|
||||
pinboard:
|
||||
name: "Pinboard"
|
||||
service_type: pinboard
|
||||
|
@ -44,8 +65,5 @@ services:
|
|||
|
||||
### Service Notes
|
||||
|
||||
#### Github
|
||||
The Archivist only supports backups of a users public repositories and gists at this time. See [#2](https://github.com/amdavidson/archivist/issues/2).
|
||||
|
||||
#### IMAP Servers
|
||||
The Archivist is currently tested against Fastmail, other IMAP servers may present issues. Report an issue with any problesm you see.
|
||||
|
|
Loading…
Reference in a new issue