Skip to content

Commit

Permalink
add duplicati
Browse files Browse the repository at this point in the history
  • Loading branch information
chendelin1982 authored Jan 15, 2024
1 parent ea16d4c commit c128b49
Show file tree
Hide file tree
Showing 13 changed files with 162 additions and 0 deletions.
27 changes: 27 additions & 0 deletions apps/duplicati/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
W9_REPO=lscr.io/linuxserver/duplicati
W9_DIST=community
W9_VERSION=latest

W9_POWER_PASSWORD=1PrMxExC45LsCT


#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

W9_ID=duplicati
W9_HTTP_PORT=8200
W9_HTTP_PORT_SET=9001

W9_URL=internet_ip
W9_NETWORK=websoft9

#### ----------------------------------------------------------------------------------------- ####


# Below environment is created by duplicati

TZ=Etc/UTC

# PUID and PGID not need because we use named volumes
#PUID=1000
#PGID=1000
# CLI_ARGS=
5 changes: 5 additions & 0 deletions apps/duplicati/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG

## Release
### Fixes and Enhancements

1 change: 1 addition & 0 deletions apps/duplicati/Notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Duplicati
25 changes: 25 additions & 0 deletions apps/duplicati/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# image,docs: https://hub.docker.com/r/linuxserver/duplicati

version: '3.8'

services:

wordpress:
image: $W9_REPO:$W9_VERSION
container_name: $W9_ID
restart: unless-stopped
ports:
- $W9_HTTP_PORT_SET:80
env_file: .env
volumes:
- config:/config
- backups:/backups
- source:/source
volumes:
config:
backups:
source:
networks:
default:
name: $W9_NETWORK
external: true
3 changes: 3 additions & 0 deletions apps/duplicati/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About

This folder includes files mount to container and used by Websoft9
1 change: 1 addition & 0 deletions apps/duplicati/src/after_up.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

12 changes: 12 additions & 0 deletions apps/duplicati/src/encrypt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
clear



# Add encrypt script below if use W9_ENCRYPT_PASSWORD at .env file
# ------------- start -------------------------



# ------------- end ---------------------------
3 changes: 3 additions & 0 deletions apps/duplicati/src/filelist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker-compose.yml
script/test.sh
docker
1 change: 1 addition & 0 deletions apps/duplicati/src/get_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

57 changes: 57 additions & 0 deletions apps/duplicati/src/nginx-proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
proxy_busy_buffers_size 512k;
proxy_buffers 4 512k;
proxy_buffer_size 256k;
client_max_body_size 50m;
# override default location /
location / {
add_header X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass $forward_scheme://$server:$port$request_uri;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}

location /console {
proxy_pass http://$server:8080;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}

# for echo some useful information
location / {
default_type text/plain;
return 200 'Hello World';
}

location /oida/ {
# this is the address and port of the ORDS installation
proxy_pass http://127.0.0.1:8080/ords/;

# set Origin to blank to avoid Chrome problems with CORS
proxy_set_header Origin "" ;

# pass along some header variables with the public host name/port/and so on
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

# this reverse proxies any "location" headers being passed in the response
proxy_redirect http://$host/ords/ https://$host/oida/;

# also tell cookies their public path
proxy_cookie_path /ords/ /oida/;

# reverse proxy links included in response (ie from ORDS webservice)
sub_filter_types application/json ;
sub_filter http://$host/ords/ https://$host/oida/;
sub_filter_once off;
}
8 changes: 8 additions & 0 deletions apps/duplicati/src/php_exra.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file_uploads = On
max_input_time = 800
max_execution_time = 300
memory_limit = 600M
upload_max_filesize = 900M
post_max_size = 900M
max_file_uploads = 200
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
1 change: 1 addition & 0 deletions apps/duplicati/src/replace_url.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# some application have write url to database or config file, once replaced url at .env, it should replace it at config file or database
18 changes: 18 additions & 0 deletions apps/duplicati/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "duplicati",
"trademark": "Duplicati",
"release": true,
"fork_url": "https://hub.docker.com/r/linuxserver/duplicati",
"edition": [
{
"dist": "community",
"version": ["2.0.7","latest"]
}
],
"requirements": {
"cpu": "1",
"memory": "1",
"disk": "1",
"url": "https://duplicati.readthedocs.io/en/latest/02-installation/#prerequisites"
}
}

0 comments on commit c128b49

Please sign in to comment.