+
Skip to content

barthofu/duplicacy-web

 
 

Repository files navigation

Duplicacy Docker

Duplicacy Web Edition in a Docker container.

Quick Start

  1. docker run -p 3875:3875 ghcr.io/barthodev/duplicacy
  2. Visit http://localhost:3875

Production Usage

  1. Bind-mount a host directory into the container at /etc/duplicacy to view, edit, and/or backup your configuration files (i.e. duplicacy.json and settings.json).
  2. Bind-mount a host directory into the container at /var/cache/duplicacy to retain statistics and cached data between container starts, stops, and restarts.
  3. Set your container's timezone using one of the following techniques:
    1. Set the TZ environment variable to your desired timezone name.

      docker run -e TZ=America/LosAngeles ... ghcr.io/barthofu/duplicacy

    2. Bind-mount /etc/localtime and /etc/timezone into the container. e.g.

      docker run                             \
        -v /etc/localtime:/etc/localtime:ro  \
        -v /etc/timezone:/etc/timezone:ro    \
        ...                                  \
        ghcr.io/barthofu/duplicacy
      
  4. Add --cap-drop=ALL for extra security.
  5. Add --restart=always to be able to make changes via the settings page.

Duplicacy license

NOTE: If you don't need to purchase a Duplicacy license, you can safely ignore this section.

Duplicacy identifies the machine via the hostname and machine-id pair. So in order to utilize a license, you'll need to make sure that both of these pieces of data do not change over time.

  1. Add --hostname to your to your docker run command to set a persistent hostname for the container.

  2. Supply a persistent machine-id, which is a 32-character lowercase hexadecimal string.

    Here are a few ways to supply a machine-id; choose whichever your like:

    1. Option 1. Bind-mount an existing machine-id into the container at /var/lib/dbus/machine-id.

      e. g. docker run -v /host/path/to/machine-id:/var/lib/dbus-machine-id:ro ...

    2. Option 2. Supply the MACHINE_ID environment variable to the container. You can generate a random string using online tools (example).

      e.g. docker run -e MACHINE_ID=b23c9e0140e92b10c2baaf1f82571a2f ...

    3. Option 3. Bake /var/lib/dbus/machine-id into a custom image. e.g. in a Dockerfile

      FROM erichough/docker-duplicacy
      COPY files/machine-id /var/lib/dbus/machine-id

Sample docker-compose.yml

version: '3.7'
services:
  duplicacy:
    image: ghcr.io/barthofu/duplicacy
    hostname: duplicacy-web
    restart: always
    ports:
      - 3875:3875
    cap_drop:
      - ALL
    environment:
      TZ: America/New_York
      MACHINE_ID: 4c601d79a045519397ade28a2f79e3d3
    volumes:
      - /host/path/to/config:/etc/duplicacy
      - /host/path/to/cache:/var/cache/duplicacy
      - /host/path/to/some-storage:/storage

Development

Update web version

  1. Go to Duplicacy releases in the "Duplicacy Web Edition" section.
  2. Note the latest version number and the SHA256 checksum of the Linux x64 executable.
  3. Update the VERSION_DUPLICACY_WEB and SHA256_DUPLICACY_WEB in the Dockerfile accordingly.

Update CLI version

  1. Go to Duplicacy github releases
  2. Note the latest version number.
  3. Update the VERSION_DUPLICACY in the Dockerfile accordingly.

Deploy

Deployment is automated via GitHub Actions. Simply push a tag following the pattern X.Y.Z to trigger a deployment on ghcr.io/barthofu/duplicacy.

About

Duplicacy Web Edition in a Docker container

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Dockerfile 55.3%
  • Shell 44.7%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载