Merge pull request #29 from abhi1693/chore/docker-compose-quickstart
Self-host: add Dockerfiles and compose quickstart
This commit is contained in:
36
.dockerignore
Normal file
36
.dockerignore
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.github
|
||||||
|
|
||||||
|
# Python
|
||||||
|
**/__pycache__
|
||||||
|
**/*.py[cod]
|
||||||
|
**/*.pyo
|
||||||
|
**/*.pyd
|
||||||
|
**/.pytest_cache
|
||||||
|
**/.mypy_cache
|
||||||
|
**/.ruff_cache
|
||||||
|
**/.coverage
|
||||||
|
**/htmlcov
|
||||||
|
**/*.egg-info
|
||||||
|
.venv
|
||||||
|
**/.venv
|
||||||
|
|
||||||
|
# Node / Next
|
||||||
|
**/node_modules
|
||||||
|
**/.next
|
||||||
|
**/dist
|
||||||
|
**/build
|
||||||
|
**/.turbo
|
||||||
|
|
||||||
|
# OS / editor
|
||||||
|
.DS_Store
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# Local env files
|
||||||
|
**/.env
|
||||||
|
**/.env.*
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
**/*.log
|
||||||
@@ -33,9 +33,13 @@ COPY --from=deps /app/.venv /app/.venv
|
|||||||
ENV PATH="/app/.venv/bin:${PATH}"
|
ENV PATH="/app/.venv/bin:${PATH}"
|
||||||
|
|
||||||
# Copy app source
|
# Copy app source
|
||||||
COPY alembic ./alembic
|
COPY backend/alembic ./alembic
|
||||||
COPY alembic.ini ./alembic.ini
|
COPY backend/alembic.ini ./alembic.ini
|
||||||
COPY app ./app
|
COPY backend/app ./app
|
||||||
|
|
||||||
|
# Copy repo-level templates used by agent provisioning, etc.
|
||||||
|
# (backend code resolves these from repo root)
|
||||||
|
COPY templates ./templates
|
||||||
|
|
||||||
# Default API port
|
# Default API port
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|||||||
11
compose.yml
11
compose.yml
@@ -31,7 +31,10 @@ services:
|
|||||||
|
|
||||||
backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
context: ./backend
|
# Build from repo root so the backend image can include repo-level assets
|
||||||
|
# like `templates/`.
|
||||||
|
context: .
|
||||||
|
dockerfile: backend/Dockerfile
|
||||||
env_file:
|
env_file:
|
||||||
- ./backend/.env.example
|
- ./backend/.env.example
|
||||||
environment:
|
environment:
|
||||||
@@ -53,8 +56,12 @@ services:
|
|||||||
context: ./frontend
|
context: ./frontend
|
||||||
args:
|
args:
|
||||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
||||||
|
# Optional, user-managed env file.
|
||||||
|
# IMPORTANT: do NOT load `.env.example` here because it contains non-empty
|
||||||
|
# placeholder Clerk keys, which can accidentally flip Clerk "on".
|
||||||
env_file:
|
env_file:
|
||||||
- ./frontend/.env.example
|
- path: ./frontend/.env
|
||||||
|
required: false
|
||||||
environment:
|
environment:
|
||||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
Reference in New Issue
Block a user