mirror of
https://github.com/Balshgit/pydio.git
synced 2025-09-11 19:50:40 +03:00
update README.md
This commit is contained in:
parent
0f1b30fa19
commit
f6f506984b
64
README.md
64
README.md
@ -1,54 +1,50 @@
|
|||||||
# HA setup
|
# Fast simple cloud based on GO language
|
||||||
|
|
||||||
Simple docker-compose deployment to experiment with Cells v4 Clustering model.
|
- with Redis cache
|
||||||
It uses `pydio/cells:unstable` docker image, use whatever image by editing the docker-compose.yml file.
|
- data storage on S3 Minio
|
||||||
|
- queue broker nats
|
||||||
|
|
||||||
## Preparing dependencies
|
Simple docker-compose deployment to experiment with Cells v4.
|
||||||
|
It uses `pydio/cells` docker image, use whatever image by editing the docker-compose.yml file.
|
||||||
|
|
||||||
HA deployments relies on external dependencies to make Cells image fully stateless.
|
## Starting Cells
|
||||||
This sample creates the following images : MySQL, MongoDB, NATS.io, ETCD, Hashicorp Vault and Redis.
|
|
||||||
|
|
||||||
This Vault requires a manual preparation for a specific key/value store (see below)
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
```sh
|
|
||||||
cd <this folder>
|
|
||||||
# start all third-party services
|
|
||||||
docker-compose up -d mysql mongo nats etcd vault redis minio caddy
|
|
||||||
|
|
||||||
# create buckets in minio
|
|
||||||
docker-compose up createbuckets
|
|
||||||
|
|
||||||
# Create a dedicated kvstore for certificates in Vault (configured in DEV mode with a preset VAULT_TOKEN, this should not be the case in production)
|
|
||||||
docker-compose exec -e VAULT_ADDR=http://localhost:8200 -e VAULT_TOKEN=secret_vault_token vault vault secrets enable -version=2 -path=caddycerts kv
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Starting Cells Nodes
|
on web browser: http://localhost:8080
|
||||||
|
|
||||||
```sh
|
login: admin
|
||||||
# Start one node, then open https://localhost:8080 to perform the install, it will read the conf/install-conf.yaml file
|
password: admin
|
||||||
docker-compose up -d cells1; docker-compose logs -f cells1
|
|
||||||
|
## storing data
|
||||||
|
|
||||||
|
setup directory with env `MINIO_STORE_DATA` in .env file
|
||||||
|
|
||||||
|
if directory created by user
|
||||||
|
```bash
|
||||||
|
sudo chown $USER:$USER /path/to/data/directory -R
|
||||||
|
sudo chmod +ugo+rw
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can spin more cells nodes:
|
By default it in current directory named `cells_data`
|
||||||
```sh
|
|
||||||
# Once install is finished, start other nodes
|
|
||||||
docker-compose up -d cells2 cells3; docker-compose logs -f cells2 cells3
|
|
||||||
```
|
|
||||||
|
|
||||||
## Caddy LoadBalancer Access
|
## Caddy LoadBalancer Access
|
||||||
|
|
||||||
Caddy load balancer is configured in self-signed mode.
|
Access https://caddy:8080/ to access Cells. Enjoy!
|
||||||
This requires adding localhost => caddy domain name to your local /etc/hosts file.
|
|
||||||
|
|
||||||
Once started, it will monitor cells instances on /pprofs endpoint to automatically enable/disable upstreams.
|
|
||||||
|
|
||||||
Access https://caddy:8585/ to access Cells. Enjoy!
|
|
||||||
|
|
||||||
## Stopping cluster
|
## Stopping cluster
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose down -v
|
||||||
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# To clean everything
|
# To clean everything
|
||||||
docker-compose down -v --remove-orphan
|
docker-compose down -v --remove-orphan
|
||||||
|
sudo rm -rf ./cells_data or user your `MINIO_STORE_DATA` storage path
|
||||||
```
|
```
|
||||||
|
|
||||||
## Clean jwt table
|
## Clean jwt table
|
||||||
@ -57,7 +53,7 @@ docker-compose down -v --remove-orphan
|
|||||||
docker exec -i pydio_mysql mysql -u pydiouser -pcellspasswrd cells < clean-jwt.sql
|
docker exec -i pydio_mysql mysql -u pydiouser -pcellspasswrd cells < clean-jwt.sql
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- if on `docker-compose down` and next `docker-compose up` getting error with jwt token
|
||||||
```sql
|
```sql
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
TRUNCATE hydra_oauth2_trusted_jwt_bearer_issuer;
|
TRUNCATE hydra_oauth2_trusted_jwt_bearer_issuer;
|
||||||
|
123
delete.yml
123
delete.yml
@ -1,123 +0,0 @@
|
|||||||
version: '3.9'
|
|
||||||
|
|
||||||
# Common variables
|
|
||||||
x-cells: &cells-common
|
|
||||||
image: pydio/cells:4.1
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- CELLS_WORKING_DIR=/var/cells
|
|
||||||
- CELLS_BROKER=nats://nats:4222
|
|
||||||
- CELLS_CACHE=redis://redis:6379
|
|
||||||
- CELLS_BIND_ADDRESS=0.0.0.0
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
cells_data: {}
|
|
||||||
mysql_data: {}
|
|
||||||
caddy_data: {}
|
|
||||||
caddy_logs: {}
|
|
||||||
caddy_config: {}
|
|
||||||
|
|
||||||
services:
|
|
||||||
|
|
||||||
# MySQL DB
|
|
||||||
mysql:
|
|
||||||
image: mysql:8.0.32
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- mysql_data:/var/lib/mysql
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=cells
|
|
||||||
- MYSQL_DATABASE=cells
|
|
||||||
- MYSQL_USER=${MYSQL_DB_USER}
|
|
||||||
- MYSQL_PASSWORD=${MYSQL_DB_PASSWORD}
|
|
||||||
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci]
|
|
||||||
|
|
||||||
# Mongo DB
|
|
||||||
mongo:
|
|
||||||
image: mongo:6.0.4
|
|
||||||
restart: unless-stopped
|
|
||||||
expose: [27017]
|
|
||||||
|
|
||||||
# Nats events broker
|
|
||||||
nats:
|
|
||||||
image: nats:2.9.15
|
|
||||||
expose:
|
|
||||||
- 4222
|
|
||||||
- 8222
|
|
||||||
#for verbose, use "--http_port 8222 -V"
|
|
||||||
command: "--http_port 8222"
|
|
||||||
|
|
||||||
|
|
||||||
redis:
|
|
||||||
image: redis:7.0.9
|
|
||||||
hostname: redis
|
|
||||||
expose: [6379]
|
|
||||||
|
|
||||||
minio:
|
|
||||||
image: quay.io/minio/minio
|
|
||||||
command: server --console-address ":9001" /data
|
|
||||||
hostname: minio
|
|
||||||
environment:
|
|
||||||
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
||||||
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
||||||
expose:
|
|
||||||
- 9000
|
|
||||||
ports:
|
|
||||||
- "9001:9001"
|
|
||||||
volumes:
|
|
||||||
- cells_data:/data
|
|
||||||
|
|
||||||
createbuckets:
|
|
||||||
image: minio/mc:RELEASE.2023-02-28T00-12-59Z
|
|
||||||
depends_on:
|
|
||||||
- minio
|
|
||||||
entrypoint: >
|
|
||||||
/bin/sh -c "
|
|
||||||
/usr/bin/mc config host add myminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
|
|
||||||
/usr/bin/mc rm -r --force myminio/pydiods1;
|
|
||||||
/usr/bin/mc rm -r --force myminio/personal;
|
|
||||||
/usr/bin/mc rm -r --force myminio/cellsdata;
|
|
||||||
/usr/bin/mc rm -r --force myminio/thumbs;
|
|
||||||
/usr/bin/mc rm -r --force myminio/versions;
|
|
||||||
/usr/bin/mc rm -r --force myminio/binaries;
|
|
||||||
/usr/bin/mc mb myminio/pydiods1;
|
|
||||||
/usr/bin/mc mb myminio/personal;
|
|
||||||
/usr/bin/mc mb myminio/cellsdata;
|
|
||||||
/usr/bin/mc mb myminio/thumbs;
|
|
||||||
/usr/bin/mc mb myminio/versions;
|
|
||||||
/usr/bin/mc mb myminio/binaries;
|
|
||||||
exit 0;
|
|
||||||
"
|
|
||||||
#
|
|
||||||
# CELLS MULTIPLE NODES
|
|
||||||
# cells1 overrides env and volumes to access the install YAML
|
|
||||||
#
|
|
||||||
cells1:
|
|
||||||
<<: *cells-common
|
|
||||||
hostname: cells1
|
|
||||||
expose: [8080]
|
|
||||||
environment:
|
|
||||||
- CELLS_WORKING_DIR=/var/cells
|
|
||||||
- CELLS_BROKER=nats://nats:4222
|
|
||||||
- CELLS_CACHE=redis://redis:6379
|
|
||||||
- CELLS_BIND_ADDRESS=0.0.0.0
|
|
||||||
|
|
||||||
- CELLS_INSTALL_YAML=/pydio/config/install.yml
|
|
||||||
- INSTALL_MYSQL_DB_USER=${MYSQL_DB_USER}
|
|
||||||
- INSTALL_MYSQL_DB_PASSWORD=${MYSQL_DB_PASSWORD}
|
|
||||||
- INSTALL_MINIO_ROOT_USER=${MINIO_ROOT_USER}
|
|
||||||
- INSTALL_MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}
|
|
||||||
volumes:
|
|
||||||
- ./conf/install-conf.yml:/pydio/config/install.yml:ro
|
|
||||||
|
|
||||||
|
|
||||||
# Caddy reverse proxy, exposed as self-signed on port 445
|
|
||||||
caddy:
|
|
||||||
image: caddy:2.6.4-alpine
|
|
||||||
ports: ["8085:8085"]
|
|
||||||
restart: unless-stopped
|
|
||||||
volumes:
|
|
||||||
- ./conf/Caddyfile:/etc/caddy/Caddyfile
|
|
||||||
- caddy_logs:/var/caddy/logs
|
|
||||||
- caddy_data:/data
|
|
||||||
- caddy_config:/config
|
|
@ -1,16 +1,21 @@
|
|||||||
version: '3.9'
|
version: '3.9'
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
cells_dir: {}
|
cells_dir:
|
||||||
mysql_data: {}
|
name: pydio_cells_dir
|
||||||
caddy_data: {}
|
mysql_data:
|
||||||
caddy_logs: {}
|
name: pydio_mysql_data
|
||||||
caddy_config: {}
|
caddy_data:
|
||||||
|
name: pydio_caddy_data
|
||||||
|
caddy_logs:
|
||||||
|
name: pydio_caddy_logs
|
||||||
|
caddy_config:
|
||||||
|
name: pydio_caddy_config
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
pydio-network:
|
pydio-network:
|
||||||
name: pydio-network
|
name: pydio_network
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
@ -19,6 +24,7 @@ services:
|
|||||||
image: mysql:8.0.32
|
image: mysql:8.0.32
|
||||||
container_name: pydio_mysql
|
container_name: pydio_mysql
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
expose: [3306]
|
||||||
volumes:
|
volumes:
|
||||||
- mysql_data:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
@ -35,7 +41,7 @@ services:
|
|||||||
image: mongo:6.0.4
|
image: mongo:6.0.4
|
||||||
container_name: pydio_mongo
|
container_name: pydio_mongo
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose: [27017]
|
expose: ["27017"]
|
||||||
networks:
|
networks:
|
||||||
- pydio-network
|
- pydio-network
|
||||||
|
|
||||||
@ -45,8 +51,8 @@ services:
|
|||||||
container_name: pydio_nats
|
container_name: pydio_nats
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose:
|
expose:
|
||||||
- 4222
|
- "4222"
|
||||||
- 8222
|
- "8222"
|
||||||
#for verbose, use "--http_port 8222 -V"
|
#for verbose, use "--http_port 8222 -V"
|
||||||
command: "--http_port 8222"
|
command: "--http_port 8222"
|
||||||
networks:
|
networks:
|
||||||
@ -57,7 +63,7 @@ services:
|
|||||||
container_name: pydio_redis
|
container_name: pydio_redis
|
||||||
hostname: redis
|
hostname: redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
expose: [6379]
|
expose: ["6379"]
|
||||||
networks:
|
networks:
|
||||||
- pydio-network
|
- pydio-network
|
||||||
|
|
||||||
@ -71,11 +77,11 @@ services:
|
|||||||
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
||||||
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
||||||
expose:
|
expose:
|
||||||
- 9000
|
- "9000"
|
||||||
ports:
|
ports:
|
||||||
- "9001:9001"
|
- "9001:9001"
|
||||||
volumes:
|
volumes:
|
||||||
- ./cells_data:/data
|
- ${MINIO_STORE_DATA}:/data
|
||||||
networks:
|
networks:
|
||||||
- pydio-network
|
- pydio-network
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user