Skip to content

Commit 9bfdab8

Browse files
authored
Update docker and CI configs (#36)
1 parent e0d5ffa commit 9bfdab8

File tree

9 files changed

+42
-24
lines changed

9 files changed

+42
-24
lines changed

.dockerignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
.idea
2-
node_modules
3-
docker-compose.*
1+
**/.idea
2+
**/node_modules
3+
**/docker-compose.*
44
.dockerignore
5+
.claude

.env.docker.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ CLIENT_PORT=4400
66
AUTH_PROVIDER_PORT=4500
77

88
WATCH="false"
9+
10+
# for development
11+
# MB_RUN_MODE="dev"
12+
# METASTORE_DEV_SERVER_URL=""

.github/workflows/e2e-tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
timeout-minutes: 10
1818
name: e2e-tests
1919
env:
20-
PREMIUM_EMBEDDING_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
20+
PREMIUM_EMBEDDING_TOKEN: ${{ secrets.STAGING_MB_ALL_FEATURES_TOKEN }}
21+
MB_RUN_MODE: dev
22+
METASTORE_DEV_SERVER_URL: ${{ secrets.METASTORE_DEV_SERVER_URL }}
2123
permissions:
2224
id-token: write
2325
contents: read
@@ -28,8 +30,7 @@ jobs:
2830
- name: Run Sample App in Docker
2931
run: |
3032
cp .env.docker.example .env.docker &&
31-
npm run docker:up -- -d &&
32-
while ! nc -z localhost 4400; do sleep 1; done
33+
npm run docker:e2e:up -- --wait
3334
3435
- name: Install Chrome v111
3536
uses: browser-actions/setup-chrome@v1
@@ -52,4 +53,4 @@ jobs:
5253
name: cypress-recording-latest
5354
path: |
5455
./e2e/cypress
55-
if-no-files-found: ignore
56+
if-no-files-found: ignore

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ build
3535
# debug
3636
*.log
3737
npm-debug.log*
38+
39+
40+
# agents
41+
.claude

docker-compose.local-dist.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
metabase:
3+
volumes:
4+
- type: bind
5+
source: ./local-dist/metabase.jar
6+
target: /app/metabase.jar
7+
read_only: true
8+
bind:
9+
create_host_path: false

docker-compose.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
services:
22
metabase:
3-
build:
4-
context: .
5-
dockerfile: metabase/Dockerfile
3+
image: metabase/metabase-enterprise:v1.55.x
64
environment:
7-
MB_CONFIG_FILE_PATH: "./app/init-config.yml"
5+
MB_CONFIG_FILE_PATH: /app/config.yml
86
MB_JETTY_PORT: "${MB_PORT}"
97
MB_EDITION: "ee"
108
MB_SITE_URL: "http://localhost:${MB_PORT}/"
119
MB_JWT_SHARED_SECRET: "${METABASE_JWT_SHARED_SECRET}"
1210
MB_SETUP_TOKEN: "${PREMIUM_EMBEDDING_TOKEN}"
1311
MB_PREMIUM_EMBEDDING_TOKEN: "${PREMIUM_EMBEDDING_TOKEN}"
12+
MB_RUN_MODE: "${MB_RUN_MODE}"
13+
METASTORE_DEV_SERVER_URL: "${METASTORE_DEV_SERVER_URL}"
1414
MB_JWT_IDENTITY_PROVIDER_URI: "http://localhost:${AUTH_PROVIDER_PORT}/sso/metabase"
1515
healthcheck:
1616
test: curl --fail -X GET -I "http://localhost:${MB_PORT}/api/health" || exit 1
@@ -19,6 +19,8 @@ services:
1919
retries: 10
2020
ports:
2121
- "${MB_PORT}:${MB_PORT}"
22+
volumes:
23+
- ./metabase/config.yml:/app/config.yml
2224

2325
client:
2426
depends_on:
@@ -35,6 +37,11 @@ services:
3537
environment:
3638
CLIENT_PORT: "${CLIENT_PORT}"
3739
VITE_METABASE_INSTANCE_URL: "http://localhost:${MB_PORT}"
40+
healthcheck:
41+
test: curl --fail -X GET -I "http://localhost:${CLIENT_PORT}/" || exit 1
42+
interval: 2s
43+
timeout: 2s
44+
retries: 5
3845
ports:
3946
- "${CLIENT_PORT}:${CLIENT_PORT}"
4047
volumes:

metabase/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.
File renamed without changes.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
"private": true,
44
"version": "0.0.0",
55
"scripts": {
6-
"start": "npm run docker:up",
6+
"start": "npm run docker:up -- --build",
77
"docker:up": "docker compose --env-file .env.docker up",
8-
"docker:down": "docker compose --env-file .env.docker down --rmi all --volumes"
8+
"docker:e2e:up": "yarn docker:up",
9+
"docker:local-dist:up": "docker compose -f docker-compose.yml -f docker-compose.local-dist.yml --env-file .env.docker up",
10+
"docker:down": "docker compose --env-file .env.docker down",
11+
"docker:rm": "yarn docker:down --rmi all --volumes"
912
}
1013
}

0 commit comments

Comments
 (0)