Skip to content

Commit 07c96a2

Browse files
authored
Update docker and CI configs (#29)
1 parent 50e9dca commit 07c96a2

File tree

13 files changed

+73
-48
lines changed

13 files changed

+73
-48
lines changed

.dockerignore

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

.env.docker.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ CLIENT_PORT_APP_ROUTER=4400
66
CLIENT_PORT_PAGES_ROUTER=4401
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: 4 additions & 3 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

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: 17 additions & 5 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
next-sample-app-router:
2426
depends_on:
@@ -38,6 +40,11 @@ services:
3840
NEXT_PUBLIC_METABASE_INSTANCE_URL: "http://localhost:${MB_PORT}"
3941
METABASE_INSTANCE_URL: "http://metabase:${MB_PORT}"
4042
METABASE_JWT_SHARED_SECRET: "${METABASE_JWT_SHARED_SECRET}"
43+
healthcheck:
44+
test: curl --fail -X GET -I "http://localhost:${CLIENT_PORT_APP_ROUTER}/" || exit 1
45+
interval: 2s
46+
timeout: 2s
47+
retries: 5
4148
ports:
4249
- "${CLIENT_PORT_APP_ROUTER}:${CLIENT_PORT_APP_ROUTER}"
4350
volumes:
@@ -51,7 +58,7 @@ services:
5158
context: .
5259
dockerfile: ./next-sample-pages-router/Dockerfile
5360
args:
54-
PORT: "${CLIENT_PORT_APP_ROUTER}"
61+
PORT: "${CLIENT_PORT_PAGES_ROUTER}"
5562
NEXT_PUBLIC_METABASE_INSTANCE_URL: "http://localhost:${MB_PORT}"
5663
METABASE_INSTANCE_URL: "http://metabase:${MB_PORT}"
5764
METABASE_JWT_SHARED_SECRET: "${METABASE_JWT_SHARED_SECRET}"
@@ -61,6 +68,11 @@ services:
6168
NEXT_PUBLIC_METABASE_INSTANCE_URL: "http://localhost:${MB_PORT}"
6269
METABASE_INSTANCE_URL: "http://metabase:${MB_PORT}"
6370
METABASE_JWT_SHARED_SECRET: "${METABASE_JWT_SHARED_SECRET}"
71+
healthcheck:
72+
test: curl --fail -X GET -I "http://localhost:${CLIENT_PORT_PAGES_ROUTER}/" || exit 1
73+
interval: 2s
74+
timeout: 2s
75+
retries: 5
6476
ports:
6577
- "${CLIENT_PORT_PAGES_ROUTER}:${CLIENT_PORT_PAGES_ROUTER}"
6678
volumes:

metabase/Dockerfile

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

next-sample-app-router/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next-sample-app-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@metabase/embedding-sdk-react": "^0.55.2",
12+
"@metabase/embedding-sdk-react": "^0.55.5",
1313
"dotenv-cli": "^8.0.0",
1414
"jsonwebtoken": "^9.0.2",
1515
"next": "14.2.18",

next-sample-pages-router/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)