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
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,21 @@ cd devlink

---

## One-Click Setup (Docker)

The easiest way to run the entire DevLink stack (Frontend, Backend, PostgreSQL, and Redis) locally is using Docker Compose.

```bash
docker compose up --build
```

The application will be available at:
- Frontend: `http://localhost:5173`
- Backend API: `http://localhost:8000`
- API Documentation: `http://localhost:8000/docs`

---

## Backend Setup

```bash
Expand Down
64 changes: 24 additions & 40 deletions backend/docker-compose.yml → docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,79 @@
version: "3.9"

services:

# ==========================================================
# PostgreSQL
# ==========================================================

postgres:
image: postgres:16-alpine
container_name: devlink-postgres

restart: unless-stopped

environment:
POSTGRES_DB: devlink
POSTGRES_USER: postgres
POSTGRES_PASSWORD: devlink123

POSTGRES_DB: devlink
POSTGRES_USER: postgres
POSTGRES_PASSWORD: devlink123
ports:
- "5432:5432"

volumes:
- postgres_data:/var/lib/postgresql/data

healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d devlink"]
interval: 10s
timeout: 5s
retries: 5

# ==========================================================
# Redis
# ==========================================================

redis:
image: redis:7-alpine
container_name: devlink-redis

restart: unless-stopped

command: redis-server --appendonly yes

ports:
- "6379:6379"

volumes:
- redis_data:/data

healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5

# ==========================================================
# FastAPI Backend
# ==========================================================

backend:
build:
context: .
context: ./backend
dockerfile: Dockerfile

container_name: devlink-backend

restart: unless-stopped

env_file:
- .env

- ./backend/.env
depends_on:
postgres:
condition: service_healthy

redis:
condition: service_healthy

ports:
- "8000:8000"

volumes:
- .:/app

- ./backend:/app
command: >
uvicorn app.main:app
--host 0.0.0.0
--port 8000
--reload

volumes:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: devlink-frontend
restart: unless-stopped
environment:
- VITE_API_URL=http://localhost:8000
- CHOKIDAR_USEPOLLING=true
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend

volumes:
postgres_data:

redis_data:
redis_data:
7 changes: 7 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 5173
CMD ["npm", "run", "dev", "--", "--host"]
Loading