Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Updated to latest YNH helpers and other fixes #13

Merged
merged 20 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# ZeroNet for YunoHost
[![Integration level](https://dash.yunohost.org/integration/zeronet.svg)](https://dash.yunohost.org/appci/app/zeronet) ![](https://ci-apps.yunohost.org/ci/badges/zeronet.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/zeronet.maintain.svg)

[![Integration level](https://dash.yunohost.org/integration/zeronet.svg)](https://dash.yunohost.org/appci/app/zeronet) ![](https://ci-apps.yunohost.org/ci/badges/zeronet.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/zeronet.maintain.svg)
[![Install ZeroNet with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=zeronet)

*[Lire ce readme en français.](./README_fr.md)*

> *This package allows you to install REPLACEBYYOURAPP quickly and simply on a YunoHost server.
> *This package allows you to install ZeroNet quickly and simply on a YunoHost server.
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*

## Overview
eroNet allows you to publish static and dynamic websites on a distributed web platform.
ZeroNet allows you to publish static and dynamic websites on a distributed web platform using Bitcoin crypto and the BitTorrent network.

**Shipped version:** 0.7.1

## Screenshots

![](https://camo.githubusercontent.com/4629a7d44a828f5bb20cedd90522ae62f0947b35/68747470733a2f2f692e696d6775722e636f6d2f4836304f4148592e706e67)

## Demo
![](https://camo.githubusercontent.com/7b79b9725df29fa5403ba490ff9870e0464a00e106bad5536867602625ca94cc/68747470733a2f2f692e696d6775722e636f6d2f4836304f4148592e706e67)

* [Official demo](Link to a demo site for this app.)

## Install
## Install instructions
- This app can only be installed on root path, i.e you will need to use a dedicated domain name, e.g.`zeronet.domain.tld`.
- The app is installed in private mode only so unauthenticated users can not temper with your content.
- If you want to be a proper ZeroNet peer (serving your and other's content) you will want to open TCP port 15441 in your firewall and make sure requests to this port reach your instance [do i need to have a port opened](https://zeronet.readthedocs.io/en/latest/faq/#do-i-need-to-have-a-port-opened)
- Alternatively you can setup Tor which has to be done manually [how to use zeronet with Tor](https://zeronet.readthedocs.io/en/latest/faq/#how-to-use-zeronet-with-tor)
- You can setup Tor which has to be done manually till its implimented in the app.[how to use zeronet with Tor](https://zeronet.readthedocs.io/en/latest/faq/#how-to-use-zeronet-with-tor)


## Multiple Instances
- Installing multiple instances of the app is *experimental*. Internally each instance it will use a unique port for both for ZeroNet UserInterface and FileServer. However, the tracker will see all instances as one peer, as they all use one and the same external IP address.
- Installing multiple instances of the app is *experimental*. Internally each instance will use an unique port for both for ZeroNet UserInterface and FileServer. However, the tracker will see all instances as one peer, as they all use one and the same external IP address. But you try it and explain your user case.
- A solution that hasn't been confirmed yet is to use Tor instead. Each instance should then have a unique external address.

## Documentation
Expand All @@ -39,23 +36,26 @@ eroNet allows you to publish static and dynamic websites on a distributed web pl

#### Multi-user support

Are LDAP and HTTP auth supported?
Can the app be used by multiple users?
Are LDAP and HTTP auth supported? No

#### Android app (Still in beta)

[Android app](https://github.com/canewsin/zeronet_mobile)

#### Supported architectures

* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/)
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/zeronet%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/zeronet/)
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/zeronet%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/zeronet/)

## Limitations

* Any known limitations.
* App can not be used inside SSO. See [here](https://github.com/HelloZeroNet/ZeroNet/issues/2541) and [here](https://github.com/YunoHost/issues/issues/1580).

## Additional information

* Other info you would like to add about this app.
* Other info you would like to add about this Zeronet.

**More info on the documentation page:**
**More info on the documentation page:**
https://yunohost.org/packaging_apps


Expand Down
40 changes: 13 additions & 27 deletions check_process
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
;; Nom du test
auto_remove=1
# Commentaire ignoré
;; Complete Test
# Comment ignored
; Manifest
domain="sub.domain.tld" (DOMAIN)
# path="/" (PATH)
admin="john" (USER)
password="seceret123" (USER)
# language="fr"
# is_public="Yes" (PUBLIC|public=Yes|private=No)
# is_public=0 (PUBLIC|public=1|private=0)
Expand All @@ -13,31 +12,18 @@
pkg_linter=1
setup_sub_dir=0
# setup_sub_dir=0 test disabled because app is always installed on /
setup_root=1
setup_root=1
setup_nourl=0
setup_private=0
# setup_private=0 test disabled because app is always installed as private
setup_public=0
upgrade=1
backup_restore=1
multi_instance=0
# multi_instance=1 test disabled because it requires installation on sub-path which is not available. successfully conducted test manually
wrong_user=1
wrong_path=0
incorrect_path=0
# corrupt_source=0
fail_download_source=0
port_already_use=1 (66)
final_path_already_use=1
;;; Levels
Level 1=auto
Level 2=auto
Level 3=auto
Level 4=na
# level 4: the app does not directly use Yunohost user data
Level 5=auto
Level 6=auto
Level 7=auto
Level 8=0
Level 9=0
Level 10=0
backup_restore=1
multi_instance=q
;;; Options
Email=
Notification=none
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&password=pass&
6 changes: 5 additions & 1 deletion conf/app.src
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
SOURCE_URL=https://github.com/HelloZeroNet/ZeroNet/archive/v0.7.1.tar.gz
SOURCE_SUM=78a27e1687d8e3699a854b77b516c95b30a8ba667f7ebbef0aabf7ec6ec7272d
SOURCE_VERSION=0.7.1
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=0.7.1
SOURCE_EXTRACT=true
9 changes: 9 additions & 0 deletions conf/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

location / {

proxy_pass http://127.0.0.1:__PORT__;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
14 changes: 0 additions & 14 deletions conf/nginx.conf.template

This file was deleted.

15 changes: 15 additions & 0 deletions conf/systemd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=__APP__ service
After=network.target

[Service]
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__
ExecStart=/usr/bin/python3 __FINALPATH__/zeronet.py --ui_port __PORT__ --ui_host __DOMAIN__ --fileserver_port __FS_PORT__ --data_dir __DATADIR__/data --log_dir __DATADIR__/log --ui_password __PASSWORD__
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
14 changes: 0 additions & 14 deletions conf/systemd.service.template

This file was deleted.

55 changes: 55 additions & 0 deletions issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
name: Bug report
about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently.

---

**How to post a meaningful bug report**
1. *Read this whole template first.*
2. *Make sure you are on the right place:*
- *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!*
- *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.*
- *In doubt, ask here and we will figure it out together.*
3. *Delete these italic comments as you write over them below, and remove this guide.*
---

### Describe the bug

*A clear and concise description of what the bug is.*

### Context

- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...*
- YunoHost version: x.x.x
- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes*
- If yes, please explain:
- Using, or trying to install package version/branch:
- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`*

### Steps to reproduce

- *If you performed a command from the CLI, the command itself is enough. For example:*
```sh
sudo yunohost app install zeronet
```
- *If you used the webadmin, please perform the equivalent command from the CLI first.*
- *If the error occurs in your browser, explain what you did:*
1. *Go to '...'*
2. *Click on '...'*
3. *Scroll down to '...'*
4. *See error*

### Expected behavior

*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.*

### Logs

*When an operation fails, YunoHost provides a simple way to share the logs.*
- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.*
- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.*

*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)*

*If applicable and useful, add screenshots to help explain your problem.*
13 changes: 7 additions & 6 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@
"example": "zeronet.domain.tld"
},
{
"name": "admin",
"type": "user",
"name": "password",
"type": "password",
"optional": true,
"ask": {
"en": "Choose an admin user (the one who will be able to access the admin interface)",
"fr": "Choisissez l'administrateur (seul autorisé à accéder à l'interface d'administration)"
"en": "Set the password for the Zeronet.",
"fr": "Définissez le mot de passe pour votre Zeronet."
},
"example": "john doe"
"example": "myreallystrengthpassword"
}
]
}
}
}
18 changes: 18 additions & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Problem
- *Description of why you made this PR*

## Solution
- *And how do you fix that problem*

## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.

## Package_check results
---
*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results*

[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/zeronet_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/zeronet_ynh%20PR-NUM-%20(USERNAME)/)
20 changes: 20 additions & 0 deletions scripts/_common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#=================================================
# COMMON VARIABLES
#=================================================

# dependencies used by the app
pkg_dependencies="python3-venv python3-pip"

#=================================================
# PERSONAL HELPERS
#=================================================

#=================================================
# EXPERIMENTAL HELPERS
#=================================================

#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================
Loading