diff --git a/.env b/.env index 7a51876..13d51ca 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ CHEETAH_DOCKER_REGISTRY=ghcr.io/trifork/ COMPOSE_PROJECT_NAME=cheetah-infrastructure COMPOSE_PATH_SEPARATOR=: -COMPOSE_FILE=docker-compose.yaml:docker-compose/kafka.yaml:docker-compose/os.yaml:docker-compose/observability.yaml:docker-compose/keycloak.yaml +COMPOSE_FILE=docker-compose.yaml:docker-compose/kafka.yaml:docker-compose/os.yaml:docker-compose/observability.yaml:docker-compose/keycloak.yaml:docker-compose/timescaledb.yaml COMPOSE_PROFILES=opensearch,kafka,oauth,redpanda,schemaregistry,opensearch_dashboard INITIAL_KAFKA_TOPICS=JobNameInputTopic diff --git a/config/pgadmin/servers.json b/config/pgadmin/servers.json new file mode 100644 index 0000000..3a365d7 --- /dev/null +++ b/config/pgadmin/servers.json @@ -0,0 +1,14 @@ +{ + "Servers": { + "1": { + "Name": "cheetah", + "Group": "Servers", + "Port": 5432, + "Username": "timescaledb", + "Host": "timescaledb", + "SSLMode": "prefer", + "MaintenanceDB": "postgres", + "PassFile": "/pgadmin4/pgpass" + } + } +} \ No newline at end of file diff --git a/docker-compose/timescaledb.yaml b/docker-compose/timescaledb.yaml new file mode 100644 index 0000000..019a6a5 --- /dev/null +++ b/docker-compose/timescaledb.yaml @@ -0,0 +1,41 @@ +services: + timescaledb: + image: timescale/timescaledb:latest-pg12 + restart: unless-stopped + mem_limit: 1024m + ports: + - 5432:5432 + environment: + POSTGRES_DB: mydatabase + POSTGRES_USER: timescaledb + POSTGRES_HOST_AUTH_METHOD: trust + volumes: + - timescaledb:/var/lib/postgresql/data + profiles: + - timescale + - full + + pgadmin: + image: dpage/pgadmin4 + restart: unless-stopped + ports: + - "5050:80" + environment: + PGADMIN_DEFAULT_EMAIL: pgadmin4@pgadmin.org + PGADMIN_DEFAULT_PASSWORD: admin + PGADMIN_CONFIG_SERVER_MODE: "False" + PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False" + volumes: + - pgadmin-data:/var/lib/pgadmin + - ./config/pgadmin/servers.json:/pgadmin4/servers.json + profiles: + - timescale + - full + +networks: + default: + name: "cheetah-infrastructure" + +volumes: + timescaledb: + pgadmin-data: \ No newline at end of file diff --git a/readme.md b/readme.md index 14b9595..2e4ad92 100644 --- a/readme.md +++ b/readme.md @@ -128,20 +128,22 @@ curl -k -s -H "Authorization: Bearer $ACCESS_TOKEN" $OPENSEARCH_URL/_cat/indices - kafka - opensearch - observability +- timescale Here is further explanation on what each profile starts. -| Images / profiles | kafka-core | opensearch-core | schema-registry-core | core | kafka | opensearch | observability | full | -| :-------------------: | :---------: | :-------------: | :-------------------: | :---: | :---: | :---------: | :-----------: | :---: | -| Keycloak | x | x | x | x | x | x | x | x | -| Kafka | x | | x | x | x | | x | x | -| Redpanda console | | | | | x | | | x | -| Opensearch | | x | | x | | x | | x | -| Opensearch dashboard | | | | | | x | | x | -| Opensearch configurer | | x | | x | | x | | x | -| Schema registry | | | x | x | x | | | x | -| Prometheus | | | | | | | x | x | -| Grafana | | | | | | | x | x | +| Images / profiles | kafka-core | opensearch-core | schema-registry-core | core | kafka | opensearch | observability | timescale | full | +| :-------------------: | :---------: | :-------------: | :-------------------: | :---: | :---: | :---------: | :-----------: | | :---: | +| Keycloak | x | x | x | x | x | x | x | | x | +| Kafka | x | | x | x | x | | x | | x | +| Redpanda console | | | | | x | | | | x | +| Opensearch | | x | | x | | x | | | x | +| Opensearch dashboard | | | | | | x | | | x | +| Opensearch configurer | | x | | x | | x | | | x | +| Schema registry | | | x | x | x | | | | x | +| Prometheus | | | | | | | x | | x | +| Grafana | | | | | | | x | | x | +| Timescale | | | | | | | x | | x | ## Keycloak