Skip to content

Commit

Permalink
feat: simplify dx
Browse files Browse the repository at this point in the history
bin/start.sh and forget about volumes crashing, high memory usage, and
docker networking
  • Loading branch information
geclos committed Jul 16, 2024
1 parent c55dc1d commit a496f75
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 70 deletions.
7 changes: 7 additions & 0 deletions .tmuxinator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ./.tmuxinator.yml

name: latitude-llm
windows:
- web: cd apps/web
- apps: pnpm dev --filter='./apps/*'
- docker: docker compose up
26 changes: 26 additions & 0 deletions bin/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

# Install tmux
if ! command -v tmux &> /dev/null
then
if command -v brew &> /dev/null
then
brew install tmux
else
sudo apt-get install tmux -y
fi
fi

# Install tmuxinator
if ! command -v tmuxinator &> /dev/null
then
if command -v brew &> /dev/null
then
brew install tmuxinator
else
sudo apt-get install tmuxinator -y
fi
fi

# Have fun!
tmuxinator
70 changes: 0 additions & 70 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,12 @@ services:
context: .
dockerfile: docker/Dockerfile.base
restart: 'none'

web:
build:
context: .
target: dev-runner
dockerfile: apps/web/docker/Dockerfile
ports:
- '3000:3000'

# Expose the Node.js debug port to the host.
- '9229:9229'
- '9230:9230'
volumes:
- ./packages/env:/app/packages/env
- ./packages/core:/app/packages/core
- ./packages/jobs:/app/packages/jobs
- ./packages/web-ui:/app/packages/web-ui
- ./apps/web:/app/apps/web
depends_on:
- base
- db
command: pnpm run dev

api:
build:
context: .
dockerfile: apps/api/docker/Dockerfile
target: development
ports:
- '3001:3001'
volumes:
- ./packages/env:/app/packages/env
- ./packages/core:/app/packages/core
- ./packages/jobs:/app/packages/jobs
- ./apps/api:/app/apps/api
depends_on:
- base
- db
command: pnpm run dev

core:
build:
context: .
dockerfile: packages/core/docker/Dockerfile
ports:
# Used to run Drizzle studio in development
- '3002:3002'
volumes:
- ./packages/core:/app/packages/core
- ./packages/env:/app/packages/env
depends_on:
- base
- db
command: pnpm db:studio

elastic:
image: elasticsearch:8.14.1
environment:
- 'discovery.type=single-node'
- 'ELASTIC_USERNAME=latitude'
- 'ELASTIC_PASSWORD=secret'

db:
image: postgres
environment:
Expand All @@ -77,20 +21,6 @@ services:
volumes:
- ./docker/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
- ./docker/pgdata:/var/lib/postgresql/data

jobs:
build:
context: .
dockerfile: packages/jobs/docker/Dockerfile
volumes:
- ./packages/env:/app/packages/env
- ./packages/core:/app/packages/core
- ./packages/jobs:/app/packages/jobs
depends_on:
- db
- redis
command: pnpm dev

redis:
image: redis
ports:
Expand Down

0 comments on commit a496f75

Please sign in to comment.