blob: bbe67e55f1abbad09c479eccf092597ab37ac543 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
version: '3.8'
services:
db:
image: postgres:18
volumes:
- postgres_data:/var/lib/postgresql
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -P password" ]
interval: 10s
timeout: 5s
retries: 5
backend:
container_name: ui-backend
# TODO: Change to apache/hamilton-ui-backend:latest once Apache images are pushed to Docker Hub
# See ui/buildx_and_push.sh for Apache-compliant image build script
image: dagworks/ui-backend:latest
build:
context: backend
dockerfile: Dockerfile.backend
entrypoint: ["/bin/bash", "-c", "cd /code/server && ls && ./entrypoint.sh"]
volumes:
- ./backend:/code
- backend_data:/data/
ports:
- "8241:8241"
environment:
- DB_HOST=db
- DB_PORT=5432
- DB_NAME=postgres
- DB_USER=postgres
- DB_PASSWORD=password # Purely for local! Do not deploy to production!
- HAMILTON_BLOB_STORE=local
- HAMILTON_ENV=local # local env
- HAMILTON_LOCAL_BLOB_DIR=/data/blobs # TODO -- set this up to be a better one
- DJANGO_SECRET_KEY=do_not_use_in_production
- HAMILTON_TELEMETRY_ENABLED=${HAMILTON_TELEMETRY_ENABLED}
- HAMILTON_AUTH_MODE=permissive
depends_on:
- db
frontend:
container_name: ui-frontend
# TODO: Change to apache/hamilton-ui-frontend:latest once Apache images are pushed to Docker Hub
# See ui/buildx_and_push.sh for Apache-compliant image build script
image: dagworks/ui-frontend:latest
build:
context: frontend
dockerfile: Dockerfile.frontend
args:
- REACT_APP_AUTH_MODE=local
- REACT_APP_USE_POSTHOG=false
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
ports:
- "8242:8242"
environment:
- NODE_ENV=development
- REACT_APP_AUTH_MODE=local
- REACT_APP_USE_POSTHOG=false
- REACT_APP_API_URL=http://backend:8241
- REACT_APP_HAMILTON_SUB_PATH= # empty default
depends_on:
- backend
volumes:
postgres_data:
backend_data: