Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker setup and connection #7

Open
sugendran opened this issue Jun 20, 2024 · 6 comments
Open

Docker setup and connection #7

sugendran opened this issue Jun 20, 2024 · 6 comments
Assignees

Comments

@sugendran
Copy link

sugendran commented Jun 20, 2024

Dropping some notes while it's fresh. Had to do the following to get a working container (dockerfile below). Also had to use the SaaS connection string (https://motherduck.com/docs/key-tasks/authenticating-to-motherduck/#syntax) for connecting to motherduck. Don't enter the token in the field that renders on the screen because it complains about not understanding how to use it

Dockerfile

FROM eclipse-temurin:11-jre-jammy

# not using the default metabase image because of duckdb and glibc compatibility
# https://github.com/metabase/metabase/blob/master/bin/docker/

# dependencies
RUN apt-get update && \
    apt-get install -y bash fontconfig curl fonts-noto fonts-noto-cjk ca-certificates-java && \
    mkdir -p /app/certs && \
    curl https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem -o /app/certs/rds-combined-ca-bundle.pem  && \
    keytool -noprompt -import -trustcacerts -alias aws-rds -file /app/certs/rds-combined-ca-bundle.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit && \
    curl https://cacerts.digicert.com/DigiCertGlobalRootG2.crt.pem -o /app/certs/DigiCertGlobalRootG2.crt.pem  && \
    keytool -noprompt -import -trustcacerts -alias azure-cert -file /app/certs/DigiCertGlobalRootG2.crt.pem -keystore /etc/ssl/certs/java/cacerts -keypass changeit -storepass changeit && \
    mkdir -p /plugins && chmod a+rwx /plugins

ENV MB_PLUGINS_DIR=/plugins/

ADD https://downloads.metabase.com/v0.50.4/metabase.jar /app
ADD https://github.com/MotherDuck-Open-Source/metabase_duckdb_driver/releases/download/0.2.7/duckdb.metabase-driver.jar /plugins/
RUN chmod 744 /plugins/duckdb.metabase-driver.jar

COPY ./run_metabase.sh /app/

# expose our default runtime port
EXPOSE 3000

ENTRYPOINT ["/app/run_metabase.sh"]
@guenp
Copy link
Member

guenp commented Jun 20, 2024

Thanks so much for sharing this! I tried it out and it works.
I was able to use the md:my_db string without using saas_mode, and passing the token also works without errors.

@hrl20
Copy link
Contributor

hrl20 commented Jun 25, 2024

Hi @sugendran, a new version of the connector has been released. If the token field still doesn't work, do you mind sharing the error message?

@sugendran
Copy link
Author

Good news. It worked, no errors.

@sugendran
Copy link
Author

One other thing would be to have it refresh the schema on demand. I press the button in the admin interface but it doesn't refetch the schema

@sugendran
Copy link
Author

Correction.. i had to hard refresh.. maybe some heavy caching on metabase

@hrl20 hrl20 self-assigned this Jul 2, 2024
@wj-c
Copy link

wj-c commented Sep 19, 2024

One other thing would be to have it refresh the schema on demand. I press the button in the admin interface but it doesn't refetch the schema

The scheme doesn't update itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants