-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
# Install from AUR on Arch Linux | ||
|
||
The AUR package maintained by [@devome](https://github.com/devome) uses the stable version of GCopy for building. | ||
|
||
## Installation | ||
|
||
Since the GCopy frontend and backend can be installed separately, the AUR package splits them into two packages: the backend [gcopy](https://aur.archlinux.org/packages/gcopy) and the frontend [gcopy-web](https://aur.archlinux.org/packages/gcopy-web). You can install them on different hosts, or you can install them on the same host. | ||
|
||
```shell | ||
## Install the backend, you can also use yay to install | ||
paru -Sy gcopy | ||
|
||
## Install the frontend, you can also use yay to install | ||
paru -Sy gcopy-web | ||
``` | ||
|
||
## Configuration | ||
|
||
### Backend | ||
|
||
For the backend, the configuration file is located at `/etc/gcopy/gcopy.env`. Edit it according to the comments, for example: | ||
|
||
```shell | ||
APPEND_ARGS="-app-key='rqMrHprILwYintES4UeQc0wM/252SLy59y7LMYKXJE0=' -smtp-host='smtp.example.com' -smtp-password='your_password' -smtp-username='username@example.com'" | ||
``` | ||
|
||
For the `app-key`, you can generate a random string using the following command: | ||
|
||
```shell | ||
openssl rand -base64 32 | ||
``` | ||
|
||
### Frontend | ||
|
||
For the frontend, the configuration file is located at `/etc/gcopy/gcopy-web.env`. Edit it according to the comments. If the backend and frontend are on different hosts, be sure to modify the `SERVER_URL`. | ||
|
||
## Starting | ||
|
||
After configuration, you can start the services: | ||
|
||
```shell | ||
## Start the backend | ||
sudo systemctl enable --now gcopy.service | ||
|
||
## Start the frontend | ||
sudo systemctl enable --now gcopy-web.service | ||
``` | ||
|
||
## Reverse Proxy | ||
|
||
In production mode, it is recommended to deploy behind a reverse proxy, such as Nginx or Apisix. This makes it easier to manage certificates and configure the proxy. You will need to prepare a domain name and the corresponding certificate. For Nginx, refer to `/usr/share/gcopy-web/nginx-example.conf`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Arch Linux 从 AUR 安装 | ||
|
||
由 [@devome](https://github.com/devome) 维护的 AUR 包使用稳定版 GCopy 来进行构建。 | ||
|
||
## 安装 | ||
|
||
由于GCopy前端和后端可以分离安装,所以 AUR 包将其分为了两个包:后端 [gcopy](https://aur.archlinux.org/packages/gcopy),前端 [gcopy-web](https://aur.archlinux.org/packages/gcopy-web)。你可以在不同的主机上安装他们,也可以在同一个主机上安装它们。 | ||
|
||
```shell | ||
## 安装后端,你也可以更换成yay来安装 | ||
paru -Sy gcopy | ||
|
||
## 安装前端,你也可以更换成yay来安装 | ||
paru -Sy gcopy-web | ||
``` | ||
|
||
## 配置 | ||
|
||
### 后端 | ||
|
||
对于后端,配置文件为 `/etc/gcopy/gcopy.env`,按照其注释编辑即可,比如: | ||
|
||
```shell | ||
APPEND_ARGS="-app-key='rqMrHprILwYintES4UeQc0wM/252SLy59y7LMYKXJE0=' -smtp-host='smtp.example.com' -smtp-password='your_password' -smtp-username='username@example.com'" | ||
``` | ||
|
||
对于`app-key`,你可以使用以下命令来生成一个随机字符串: | ||
|
||
```shell | ||
openssl rand -base64 32 | ||
``` | ||
|
||
### 前端 | ||
|
||
对于前端,配置文件为 `/etc/gcopy/gcopy-web.env`,按照其注释编辑即可,如果后端和前端在不同主机上,请注意修改`SERVER_URL`。 | ||
|
||
## 启动 | ||
|
||
配置好以后,启动即可: | ||
|
||
```shell | ||
## 启动后端 | ||
sudo systemctl enable --now gcopy.service | ||
|
||
## 启动前端 | ||
sudo systemctl enable --now gcopy-web.service | ||
``` | ||
|
||
## 反向代理 | ||
|
||
在生产模式, 推荐部署在反向代理的后面, 例如 Nginx、Apisix等. 这样您就可以方便的管理证书和配置代理, 你需要准备好域名和对应的证书。以nginx为例, 参考`/usr/share/gcopy-web/nginx-example.conf`。 |