- Install PostgreSQL:
apt install postgresql
- Create a
postgres
superuser:# sudo -u postgres psql # CREATE ROLE "carbonio-files-adm" WITH LOGIN SUPERUSER encrypted password 'your-secret-password'; # CREATE DATABASE "carbonio-files-adm" owner "carbonio-files-adm"; # \q
Install carbonio-files-db
via apt:
sudo apt install carbonio-files-db
or via yum:
sudo yum install carbonio-files-db
In order to make it work with external databases the carbonio-files-db.hcl
MUST be manually
updated by changing the address from 127.0.0.1
to the remote address. To finalize the
configuration:
- Execute
pending-setups
in order to register the service in theservice-discover
- Bootstrap the Files database:
PGPASSWORD=your-secret-password carbonio-files-db-bootstrap carbonio-files-adm 127.0.0.1
If the bootstrap script is executed multiple times it reuses the credentials created the first time and stored in service-discover
.
All the necessary configurations are saved automatically in the service-discover
configuration
system. They can be retrieved with the following commands:
consul kv get -token-file="/etc/carbonio/files/service-discover/token" "carbonio-files/db-name"
consul kv get -token-file="/etc/carbonio/files/service-discover/token" "carbonio-files/db-username"
consul kv get -token-file="/etc/carbonio/files/service-discover/token" "carbonio-files/db-password"
Service sidecar used by Zextras Carbonio Files to communicate with a centralized database.
Released under the AGPL-3.0-only license as specified here: COPYING.
Copyright (C) 2022 Zextras https://www.zextras.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
See COPYING file for the project license details
See THIRDPARTIES file for other licenses details
All non-software material (such as, for example, names, images, logos, sounds) is owned by Zextras s.r.l. and is licensed under CC-BY-NC-SA.
Where not specified, all source files owned by Zextras s.r.l. are licensed under AGPL-3.0-only