Skip to content

Commit

Permalink
Merge pull request #12 from kbase/dev_docker_compose_settings
Browse files Browse the repository at this point in the history
Align the local env more with the Rancher-deployed env
  • Loading branch information
Tianhao-Gu authored May 28, 2024
2 parents 0225913 + 2351e5c commit d1cafe4
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ services:
dockerfile: Dockerfile
container_name: spark-master
ports:
- "8080:8080"
- "7077:7077"
- "8090:8090"
environment:
- SPARK_MODE=master
- SPARK_MASTER_WEBUI_PORT=8080
- SPARK_MASTER_HOST=0.0.0.0
- SPARK_MASTER_WEBUI_PORT=8090

spark-worker-1:
image: bitnami/spark:3.5.1
Expand Down Expand Up @@ -56,25 +54,21 @@ services:
minio:
image: minio/minio
container_name: spark-minio
expose:
- "9000"
ports:
- "9000:9000"
# MinIO Console is available at http://localhost:9001
- "9001:9001"
- "9002:9002"
# MinIO Console is available at http://localhost:9003
- "9003:9003"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
healthcheck:
# reference: https://github.com/rodrigobdz/docker-compose-healthchecks?tab=readme-ov-file#minio-release2023-11-01t18-37-25z-and-older
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9000' || exit 1
test: timeout 5s bash -c ':> /dev/tcp/127.0.0.1/9002' || exit 1
interval: 1s
timeout: 10s
retries: 5
# Note there is no bucket by default
command: server /data --console-address ":9001"
command: server --address 0.0.0.0:9002 --console-address 0.0.0.0:9003 /data

minio-create-bucket:
image: minio/mc
Expand All @@ -83,7 +77,7 @@ services:
condition: service_healthy
entrypoint: >
bash -c "
mc alias set minio http://minio:9000 minio minio123 &&
mc alias set minio http://minio:9002 minio minio123 &&
if ! mc ls minio/delta-lake 2>/dev/null; then
mc mb minio/delta-lake && echo 'Bucket delta-lake created'
else
Expand All @@ -105,7 +99,7 @@ services:
- NOTEBOOK_PORT=4041
- SPARK_MASTER_URL=spark://spark-master:7077
- SPARK_DRIVER_HOST=spark-notebook
- MINIO_URL=http://minio:9000
- MINIO_URL=http://minio:9002
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
- SPARK_MODE=notebook
Expand Down

0 comments on commit d1cafe4

Please sign in to comment.