stack/docker
Zai Shi a7acab4646
Auto migration (#526)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Introduces an automated database migration system, replacing manual
Prisma commands with new scripts and updating workflows, configurations,
and tests accordingly.
> 
>   - **Auto-Migration System**:
> - Introduces `db-migrations.ts` script for handling database
migrations automatically.
> - Adds utility functions in `utils.tsx` for managing migration files.
> - Implements `applyMigrations` and `runMigrationNeeded` in `index.tsx`
for executing migrations.
>   - **Workflow and Scripts**:
> - Updates GitHub workflows (`check-prisma-migrations.yaml`,
`e2e-api-tests.yaml`) to use new migration commands.
> - Replaces `prisma migrate` commands with `db:init`, `db:migrate`,
etc., in `package.json` and `README.md`.
>   - **Testing**:
> - Adds `auto-migration.tests.ts` for testing migration logic and
concurrency handling.
>   - **Configuration**:
> - Updates `.env.development` and `vitest.config.ts` for new
environment variables and paths.
> - Modifies `turbo.json` and `package.json` to include new migration
tasks and scripts.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 2c24183879. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-24 02:38:37 +02:00
..
dependencies Local emulator (#422) 2025-02-13 18:57:02 +01:00
emulator Port dashboard to Next.js 15 (#560) 2025-03-24 00:03:50 +01:00
mock-oauth-server Local emulator (#422) 2025-02-13 18:57:02 +01:00
postgres-with-extensions Local emulator (#422) 2025-02-13 18:57:02 +01:00
server Auto migration (#526) 2025-07-24 02:38:37 +02:00
readme.md Port dashboard to Next.js 15 (#560) 2025-03-24 00:03:50 +01:00
README.md Fix docker (#664) 2025-05-08 01:31:03 +02:00

Server

Build

docker build --progress=plain -f docker/server/Dockerfile -t server .

Run

docker run --env-file docker/server/.env.example -p 8101:8101 -p 8102:8102 -t server

Emulator

Build & run

docker-compose -f docker/emulator/docker.compose.yaml up --build