mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-03 08:28:35 +02:00
This patch passes the explicit path to the prisma schema so that the initial table creation is performed. Otherwise the command will print: No migration found in prisma/migrations And attempting to create a poll produces the postgres error: ERROR: relation "public.users" does not exist at character 35 STATEMENT: SELECT "public"."users"."id" FROM "public"."users" WHERE "public"."users"."email" = $1 OFFSET $2 Signed-off-by: Trammell Hudson <hudson@trmm.net>
30 lines
706 B
YAML
30 lines
706 B
YAML
version: "3.3"
|
|
services:
|
|
rallly_db:
|
|
image: postgres:14.2
|
|
restart: always
|
|
volumes:
|
|
- db-data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
rallly:
|
|
build:
|
|
context: .
|
|
args:
|
|
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db?pgbouncer=true
|
|
- NEXT_PUBLIC_BASE_URL=${NEXT_PUBLIC_BASE_URL}
|
|
restart: always
|
|
command: sh -c "yarn prisma migrate deploy --schema prisma/schema.prisma && yarn start"
|
|
depends_on:
|
|
- rallly_db
|
|
ports:
|
|
- 3000:3000
|
|
environment:
|
|
- DATABASE_URL=postgres://postgres:postgres@rallly_db:5432/db
|
|
env_file:
|
|
- .env
|
|
|
|
volumes:
|
|
db-data:
|
|
driver: local
|