Prisma Init
This commit is contained in:
+17
-11
@@ -1,26 +1,32 @@
|
||||
services:
|
||||
api:
|
||||
image: node:26-alpine
|
||||
working_dir: /app
|
||||
command: sh -c "npm install -g pnpm && pnpm install && pnpm start:dev"
|
||||
volumes:
|
||||
- .:/app
|
||||
- node_modules:/app/node_modules
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
expose:
|
||||
- "${PORT:-3000}"
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: ${PORT:-3000}
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
|
||||
DATABASE_URL: ${DATABASE_URL:-postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}}
|
||||
depends_on:
|
||||
- postgres
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
postgres:
|
||||
image: postgres:18-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: ${POSTGRES_DB}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- postgres_data:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
volumes:
|
||||
node_modules:
|
||||
postgres_data:
|
||||
postgres_data:
|
||||
|
||||
Reference in New Issue
Block a user