Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Credentials
dashboard/.tanstack/
application_default_credentials.json
.vscode
.env
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,5 @@ If you want to verify container/deployment environment settings before running s
## Contributing

Check out our [CONTRIBUTING.md](/CONTRIBUTING.md), and there is an [onboarding guide](docs/Onboarding.md) to help get acquainted with the project. Contributions are welcome!

For a local development environment with live reload (backend + frontend), see [docs/dev-environment.md](docs/dev-environment.md).
2 changes: 2 additions & 0 deletions dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
src/.tanstack-tmp/

# Logs
logs
*.log
Expand Down
8 changes: 8 additions & 0 deletions dashboard/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:22.3-alpine
WORKDIR /dashboard
RUN npm install -g pnpm
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
EXPOSE 5173
CMD ["pnpm", "dev", "--host"]
79 changes: 79 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
volumes:
backend-data:
dashboard-db-data:

networks:
public:
private:

services:
backend:
build:
context: ./backend
volumes:
- backend-data:${BACKEND_VOLUME_DIR:-/volume_data}
- ./backend:/backend # live reload: source mounted over image copy
env_file: [.env]
environment:
- PYTHONOPTIMIZE=0 # required for runserver/reload to work correctly
networks: [private, public]
ports: ["8000:8000"]
command:
- poetry
- run
- python
- manage.py
- runserver
- 0.0.0.0:8000
entrypoint: "./utils/docker/backend_entrypoint.sh"
depends_on:
dashboard_db:
condition: service_healthy
redis:
condition: service_started

dashboard_db:
image: postgres:17
environment:
- POSTGRES_USER=${DB_USER:-admin}
- POSTGRES_PASSWORD=${DB_PASSWORD:-barebare}
- POSTGRES_DB=${DB_NAME:-dashboard}
volumes:
- dashboard-db-data:/var/lib/postgresql/data
networks: [private]
ports: ["5432:5432"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-admin}"]
interval: 5s
timeout: 5s
retries: 5

redis:
image: redis:8.0-M04-alpine
networks: [private]

dashboard_dev:
build:
context: ./dashboard
dockerfile: Dockerfile.dev
environment:
- TSR_TMP_DIR=/dashboard/src/.tanstack-tmp # keep codegen tmp on same bind mount as routeTree.gen.ts
volumes:
- ./dashboard/src:/dashboard/src # HMR: watch source changes
- ./dashboard/public:/dashboard/public # HMR: watch public assets
networks: [public]
ports: ["5173:5173"]

proxy:
build: ./proxy
restart: always
depends_on: [backend, dashboard_dev]
networks: [public]
volumes:
# Override default template with dev template (Vite proxy + WebSocket)
- ./proxy/etc/nginx/templates/dev.conf.template:/etc/nginx/templates/default.conf.template
environment:
- PROXY_TARGET=${PROXY_TARGET:-http://backend:8000}
ports:
- ${STAGING_EXTERNAL_HTTP_PORT:-9000}:80
env_file: [.env]
Loading