2025-01-04 05:32:54 +08:00
|
|
|
dev:
|
2025-05-08 08:53:53 +08:00
|
|
|
cd .. && docker run -d --name buster-redis-make -p 6379:6379 -v buster_redis_data:/data redis && cd api && \
|
2025-01-04 05:32:54 +08:00
|
|
|
supabase start
|
|
|
|
supabase db reset
|
2025-01-09 12:18:08 +08:00
|
|
|
export DATABASE_URL=postgres://postgres:postgres@127.0.0.1:54322/postgres && \
|
2025-01-04 05:32:54 +08:00
|
|
|
diesel migration run && \
|
2025-05-03 02:54:16 +08:00
|
|
|
PGPASSWORD=postgres psql -h 127.0.0.1 -p 54322 -d postgres -U postgres -f libs/database/setup.sql && \
|
2025-03-05 00:46:26 +08:00
|
|
|
PGPASSWORD=postgres psql -h 127.0.0.1 -p 54322 -d postgres -U postgres -f libs/database/seed.sql && \
|
2025-01-04 05:32:54 +08:00
|
|
|
export RUST_LOG=debug
|
|
|
|
export CARGO_INCREMENTAL=1
|
2025-04-03 01:31:43 +08:00
|
|
|
nice cargo watch -C server -x run
|
2025-01-04 05:32:54 +08:00
|
|
|
|
2025-05-03 02:14:37 +08:00
|
|
|
update-seed:
|
2025-05-03 03:54:20 +08:00
|
|
|
PGPASSWORD=postgres pg_dump -h 127.0.0.1 -p 54322 -U postgres -d postgres \
|
|
|
|
--data-only --no-owner --no-privileges \
|
|
|
|
--schema=public \
|
|
|
|
--exclude-table=schema_migrations \
|
|
|
|
--exclude-table=__diesel_schema_migrations \
|
|
|
|
--exclude-table=migrations \
|
|
|
|
--exclude-table=users \
|
2025-05-03 02:14:37 +08:00
|
|
|
> libs/database/seed.sql
|
|
|
|
|
2025-01-04 05:32:54 +08:00
|
|
|
stop:
|
2025-05-08 08:53:53 +08:00
|
|
|
docker stop buster-redis-make || true && \
|
|
|
|
docker rm buster-redis-make || true && \
|
|
|
|
cd .. && docker compose down && supabase stop
|
2025-01-04 05:32:54 +08:00
|
|
|
|
|
|
|
fast:
|
2025-05-08 08:53:53 +08:00
|
|
|
cd .. && docker run -d --name buster-redis-make -p 6379:6379 -v buster_redis_data:/data redis && cd api && \
|
2025-04-25 01:41:31 +08:00
|
|
|
export RUST_LOG=debug && \
|
|
|
|
export CARGO_INCREMENTAL=1 && \
|
2025-04-03 01:31:43 +08:00
|
|
|
nice cargo watch -C server -x run
|