This tutorial will guide you through setting up and using TimescaleDB using Docker Compose.
Prerequisites
- Docker installed on your system
- Docker Compose installed on your system
Getting Started
-
Start the TimescaleDB Container
Navigate to the directory containing the
docker-compose.ymlfile and run:docker-compose up -dThis will start TimescaleDB in detached mode. The database will be accessible on port 5432.
-
Connection Details
- Host: localhost
- Port: 5432
- Database: timescale
- Username: timescale
- Password: timescale
-
Verify the Installation
You can connect to the database using psql or any PostgreSQL client:
docker exec -it timescale-timescaledb-1 psql -U timescale -d timescaleOnce connected, you can verify TimescaleDB is properly installed:
SELECT default_version, installed_extensions FROM pg_available_extensions WHERE name = 'timescaledb';
You must be logged in to post a comment.