-
-
Save ShubhamRasal/2032592f33a5683831981c05a8d3f892 to your computer and use it in GitHub Desktop.
Deploy metabase with Caddy using Docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ===================================== | |
# Database environment | |
# | |
DB_TYPE=mysql | |
DB_HOST= | |
DB_NAME= | |
DB_USER= | |
DB_PASSWORD= | |
DB_PORT=3306 | |
# ===================================== | |
# Metabase environment | |
# | |
MB_DB_FILE=/metabase-data/metabase.db | |
MB_PORT=3000 | |
MB_VOLUME=mb-data | |
MB_JAVA_TIMEZONE=America/Buenos_Aires |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<domain-name> { | |
reverse_proxy /* metabase:3000 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
caddy: | |
image: caddy:2-alpine | |
restart: unless-stopped | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- caddy_data:/data | |
- caddy_config:/config | |
- $PWD/Caddyfile:/etc/caddy/Caddyfile | |
networks: | |
- external | |
- internal | |
metabase: | |
image: metabase/metabase | |
restart: always | |
environment: | |
MB_DB_TYPE: '${DB_TYPE}' | |
MB_DB_DBNAME: '${DB_NAME}' | |
MB_DB_FILE: '${MB_DB_FILE}' | |
MB_DB_PORT: '${DB_PORT}' | |
MB_DB_USER: '${DB_USER}' | |
MB_DB_HOST: '${DB_HOST}' | |
MB_DB_PASS: '${DB_PASSWORD}' | |
JAVA_TIMEZONE: '${MB_JAVA_TIMEZONE}' | |
ports: | |
# <Port exposed>:<Port running inside container> | |
- '${MB_PORT}:3000' | |
volumes: | |
# Volumes where Metabase data will be persisted | |
- 'mb-data:/metabase-data' | |
networks: | |
internal: | |
ipv4_address: 192.168.224.2 | |
networks: | |
external: | |
external: false | |
internal: | |
external: false | |
driver: bridge | |
ipam: | |
config: | |
- subnet: 192.168.224.0/24 | |
gateway: 192.168.224.1 | |
volumes: | |
mb-data: | |
caddy_data: | |
caddy_config: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: