Skip to content

Commit

Permalink
updated demo cluster. added one more db and persistence to metabase.
Browse files Browse the repository at this point in the history
  • Loading branch information
kamir committed Sep 23, 2024
1 parent 57fc38b commit 5371eab
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docker_compose/demo_env_cluster/dataset/init3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
\c postgres;

DROP DATABASE IF EXISTS apache_wayang_test_db;

CREATE DATABASE apache_wayang_test_db;

\c apache_wayang_test_db;

CREATE TABLE local_averages(
CategoryID SERIAL PRIMARY KEY,
CategoryName varchar(50),
CategoryCount integer,
CategorySum integer
);
insert into local_averages(CategoryName,CategoryCount,CategorySum)
values ('car',800,400),
('bike', 1000, 500),
('bus', 1200, 600),
('train', 1500, 900),
('plane', 2000, 1200);
18 changes: 18 additions & 0 deletions docker_compose/demo_env_cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ services:
- ./apps:/opt/spark-apps
- ./data:/opt/spark-data

postgres3:
image: postgres:12
hostname: postgres3
container_name: postgres3
ports:
- "5434:5432"
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: apache_wayang_test_db
volumes:
- ./dataset/init3.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- democluster_net

postgres2:
image: postgres:12
hostname: postgres2
Expand Down Expand Up @@ -177,6 +191,10 @@ services:

metabase:
image: metabase/metabase:latest
volumes:
- ./metabase-data:/metabase-data
environment:
- MB_DB_FILE=/metabase-data/metabase.db
depends_on:
- postgres
ports:
Expand Down

0 comments on commit 5371eab

Please sign in to comment.