Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/probe-lab/caracol
Caracol is a service for aggregating time series from external data systems.
https://github.com/probe-lab/caracol
Last synced: 9 days ago
JSON representation
Caracol is a service for aggregating time series from external data systems.
- Host: GitHub
- URL: https://github.com/probe-lab/caracol
- Owner: probe-lab
- Created: 2023-04-18T14:55:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-23T12:54:26.000Z (4 months ago)
- Last Synced: 2024-08-23T14:19:09.773Z (4 months ago)
- Language: Go
- Homepage:
- Size: 150 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Caracol
Caracol is a service for aggregating time series from external data systems.
## Database
### Creating the database and initial users
Create a database and a user that has permissions to access it.
The following sql is an example that creates a database and a user called caracol:
-- Create the database
CREATE DATABASE caracol;-- Create the owner role
CREATE ROLE caracol;
GRANT caracol TO postgres;ALTER DATABASE caracol OWNER TO caracol;
GRANT ALL PRIVILEGES ON SCHEMA public TO caracol;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO caracol;-- The following is run substituting the passwords
-- ALTER ROLE caracol WITH LOGIN PASSWORD '';
ALTER ROLE caracol_ro WITH LOGIN PASSWORD '';### Creating and updating the schema
This project uses [tern](https://github.com/jackc/tern) to manage the database schema.
Install using `go install github.com/jackc/tern/v2@latest`
To update the database to the latest schema run `tern migrate` in the `migrations` directory.
Supply database details through environment variables or on the command line:
tern migrate --conn-string postgres://user:password@hostname:5432/caracol?sslmode=disable