-
Notifications
You must be signed in to change notification settings - Fork 64
feat: add Docker Compose for single-command local development #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
AtherBilal
wants to merge
1
commit into
10xapp:main
Choose a base branch
from
AtherBilal:feat/docker-compose
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # ============================================================================== | ||
| # Core — Docker Compose Environment Variables | ||
| # ============================================================================== | ||
| # Copy this file to .env and fill in the values. | ||
| # Used by `docker compose up` to configure both the API and frontend. | ||
| # | ||
| # For non-Docker setups, use core-api/.env and core-web/.env instead. | ||
| # ============================================================================== | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [REQUIRED] Supabase | ||
| # ------------------------------------------------------------------------------ | ||
| # Create a project at https://supabase.com and grab these from Settings > API | ||
| SUPABASE_URL=https://your-project.supabase.co | ||
| SUPABASE_ANON_KEY=your-anon-key | ||
| SUPABASE_SERVICE_ROLE_KEY=your-service-role-key | ||
| SUPABASE_JWT_SECRET=your-jwt-secret | ||
|
|
||
| # Frontend Supabase config (must match the values above) | ||
| VITE_SUPABASE_URL=https://your-project.supabase.co | ||
| VITE_SUPABASE_ANON_KEY=your-anon-key | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [REQUIRED] API | ||
| # ------------------------------------------------------------------------------ | ||
| API_ENV=development | ||
| DEBUG=false | ||
| # If you override CORE_WEB_PORT, update this to match (e.g. http://localhost:4000) | ||
| FRONTEND_URL=http://localhost:3000 | ||
| # If you override CORE_API_PORT, update this to match (e.g. http://localhost:9000/api) | ||
| VITE_API_URL=http://localhost:8000/api | ||
| # Comma-separated CORS origins. Only needed if running on non-default ports. | ||
| # ALLOWED_ORIGINS_ENV=http://localhost:4000 | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
coderabbitai[bot] marked this conversation as resolved.
|
||
| # ------------------------------------------------------------------------------ | ||
| # [OPTIONAL] Email/Password Auth — Self-hosted | ||
| # ------------------------------------------------------------------------------ | ||
| # Set to "true" to enable email/password sign-in (skips OAuth setup). | ||
| # Tip: disable "Enable email confirmations" in Supabase (Auth > Settings) | ||
| # to skip the verification email step during local development. | ||
| # VITE_ENABLE_EMAIL_AUTH=true | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [OPTIONAL] Sentry — Error Tracking | ||
| # ------------------------------------------------------------------------------ | ||
| # SENTRY_DSN= | ||
| # VITE_SENTRY_DSN= | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [OPTIONAL] PostHog — Analytics | ||
| # ------------------------------------------------------------------------------ | ||
| # VITE_POSTHOG_KEY= | ||
| # VITE_POSTHOG_HOST= | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [FEATURE] AI Chat — OpenAI / Anthropic | ||
| # ------------------------------------------------------------------------------ | ||
| # OPENAI_API_KEY=sk-... | ||
| # ANTHROPIC_API_KEY=sk-ant-... | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [FEATURE] File Storage — Cloudflare R2 | ||
| # ------------------------------------------------------------------------------ | ||
| # R2_ACCOUNT_ID=your-account-id | ||
| # R2_ACCESS_KEY_ID=your-access-key | ||
| # R2_SECRET_ACCESS_KEY=your-secret-key | ||
| # R2_BUCKET_NAME=core-os-files | ||
| # R2_S3_API=https://your-account-id.r2.cloudflarestorage.com | ||
| # R2_PUBLIC_URL=https://files.yourdomain.com | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [FEATURE] Google OAuth — Gmail & Calendar Sync | ||
| # ------------------------------------------------------------------------------ | ||
| # GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com | ||
| # GOOGLE_CLIENT_SECRET=your-client-secret | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # [FEATURE] Microsoft OAuth — Outlook & Microsoft 365 Sync | ||
| # ------------------------------------------------------------------------------ | ||
| # MICROSOFT_CLIENT_ID=your-client-id | ||
| # MICROSOFT_CLIENT_SECRET=your-client-secret | ||
| # MICROSOFT_TENANT_ID=common | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| .venv | ||
| __pycache__ | ||
| .pytest_cache | ||
| .env | ||
| .git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| FROM python:3.13-slim | ||
|
|
||
| RUN useradd --create-home appuser | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install dependencies | ||
| COPY requirements.txt . | ||
| RUN pip install --no-cache-dir -r requirements.txt | ||
|
|
||
| # Copy only the application code needed to run | ||
| COPY api/ api/ | ||
| COPY lib/ lib/ | ||
| COPY index.py dev.py ./ | ||
|
|
||
| RUN chown -R appuser:appuser /app | ||
|
|
||
| USER appuser | ||
|
|
||
| EXPOSE 8000 | ||
|
|
||
| # Development server with hot reload | ||
| CMD ["python", "dev.py"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| node_modules | ||
| dist | ||
| .env | ||
| .git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| FROM node:22-slim | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Install dependencies | ||
| COPY package.json package-lock.json ./ | ||
| RUN npm ci | ||
|
|
||
| # Copy only the application code needed to run | ||
| COPY index.html vite.config.ts tsconfig.json tsconfig.app.json tsconfig.node.json ./ | ||
| COPY src/ src/ | ||
| COPY public/ public/ | ||
|
|
||
| RUN chown -R node:node /app | ||
|
|
||
| USER node | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| # Development server with hot reload | ||
| CMD ["npm", "run", "dev", "--", "--host"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| services: | ||
| api: | ||
| build: ./core-api | ||
| user: "${UID:-1000}:${GID:-1000}" | ||
| ports: | ||
| - "${CORE_API_PORT:-8000}:8000" | ||
| env_file: | ||
| - .env | ||
| volumes: | ||
| - ./core-api:/app | ||
| - /app/__pycache__ | ||
| healthcheck: | ||
| test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/')"] | ||
| interval: 10s | ||
| timeout: 15s | ||
| retries: 5 | ||
| start_period: 30s | ||
| restart: unless-stopped | ||
|
|
||
| web: | ||
| build: ./core-web | ||
| user: "${UID:-1000}:${GID:-1000}" | ||
| ports: | ||
| - "${CORE_WEB_PORT:-3000}:3000" | ||
| env_file: | ||
| - .env | ||
| volumes: | ||
| - ./core-web:/app | ||
| - /app/node_modules | ||
| depends_on: | ||
| api: | ||
| condition: service_healthy | ||
| restart: unless-stopped |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Port override guidance is incomplete:
ALLOWED_ORIGINS_ENVmust also be synced.The inline comments explain that
FRONTEND_URLmust matchCORE_WEB_PORTandVITE_API_URLmust matchCORE_API_PORT, but there's no guidance thatALLOWED_ORIGINS_ENVmust ALSO be updated whenCORE_WEB_PORTchanges (to allow the new frontend origin through CORS). This creates a broken configuration path.📝 Proposed documentation update
🤖 Prompt for AI Agents