- Add typescript lint rules (consistent-type-imports, no-import-type-side-effects) - Set idle session timeout in postgres dev container - Add react-hook-text-overflow dependency with patch
106 lines
2.1 KiB
YAML
Executable File
106 lines
2.1 KiB
YAML
Executable File
services:
|
|
# services
|
|
app:
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
build:
|
|
context: ..
|
|
dockerfile: dev.dockerfile
|
|
develop:
|
|
watch:
|
|
- path: ..
|
|
target: /home/container
|
|
action: sync
|
|
env_file:
|
|
- ../.env
|
|
- .env.development
|
|
ports:
|
|
- 3000:3000
|
|
restart: on-failure
|
|
backend:
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
build:
|
|
context: ..
|
|
dockerfile: backend.dockerfile
|
|
develop:
|
|
watch:
|
|
- path: ../backend
|
|
action: rebuild
|
|
- path: ../.env
|
|
action: rebuild
|
|
env_file: .env.development
|
|
restart: on-failure
|
|
stop_grace_period: 1s
|
|
|
|
# databases
|
|
db:
|
|
image: pgautoupgrade/pgautoupgrade:trixie
|
|
environment:
|
|
POSTGRES_PASSWORD: dev
|
|
PGDATA: /pgdata
|
|
volumes:
|
|
- pgdata:/pgdata
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -q -U postgres -d postgres"]
|
|
interval: 1s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
restart: on-failure
|
|
ports:
|
|
- 5432:5432
|
|
command: -p 5432 -c idle_session_timeout=60000
|
|
redis:
|
|
image: redis:latest
|
|
ports:
|
|
- 6379:6379
|
|
volumes:
|
|
- redis:/data
|
|
command: --save 60 1 --loglevel warning
|
|
restart: on-failure
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s
|
|
|
|
# tools
|
|
redis-commander:
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
hostname: redis-commander
|
|
image: ghcr.io/joeferner/redis-commander:latest
|
|
environment:
|
|
- REDIS_HOSTS=local:redis:6379
|
|
ports:
|
|
- "6380:8081"
|
|
user: redis
|
|
restart: on-failure
|
|
drizzle:
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
build:
|
|
context: ..
|
|
dockerfile: dev.dockerfile
|
|
volumes:
|
|
- ../app:/home/container/app
|
|
env_file: .env.development
|
|
ports:
|
|
- 4983:4983
|
|
restart: on-failure
|
|
command: ash -c "bun dr studio --host $(hostname)"
|
|
|
|
volumes:
|
|
pgdata:
|
|
redis:
|