[infra] Import metabase conf

This commit is contained in:
Manav Rathi
2024-07-18 09:57:50 +05:30
parent f2057cbaa8
commit 6d04ed1f8f
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
# Metabase
Use the embedded H2 database (this db contains users, saved queries etc). The
database is a mounted as a file from the local filesystem into the container.
To take backups, backup `/root/metabase.db`
## Installation
If there are any existing backups, place them in `/root/metabase.db`.
Then add the Nginx conf
sudo mv metabase.nginx.conf /root/nginx/conf.d
and reload the nginx service.

View File

@@ -0,0 +1,16 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/certs/cert.pem;
ssl_certificate_key /etc/ssl/private/key.pem;
server_name mb.ente.io;
location / {
proxy_pass http://host.docker.internal:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

View File

@@ -0,0 +1,13 @@
[Unit]
Documentation=https://www.metabase.com/docs/
Requires=docker.service
After=docker.service
[Service]
ExecStartPre=docker pull metabase/metabase
ExecStartPre=-docker stop metabase
ExecStartPre=-docker rm metabase
ExecStart=docker run --name metabase \
-p 3000:3000 \
-v /root/metabase.db:/metabase.db \
metabase/metabase