recuperando informacion y tratandola
This commit is contained in:
+31
-2
@@ -1,9 +1,20 @@
|
||||
# Development Docker Compose (self-contained).
|
||||
# This file defines both the app (with live reload) and the db.
|
||||
#
|
||||
# Usage (from project root):
|
||||
# docker compose -f docker-compose.dev.yml up --build
|
||||
#
|
||||
# After first start the database migrations run automatically before the dev server.
|
||||
# Stop with: docker compose -f docker-compose.dev.yml down
|
||||
#
|
||||
# For production-like: docker compose -f docker-compose.yml up
|
||||
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
target: deps
|
||||
command: npm run dev
|
||||
command: sh -c "npm run db:migrate && npm run dev"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- .:/app
|
||||
@@ -21,4 +32,22 @@ services:
|
||||
WATCHPACK_POLLING: "true"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
condition: service_healthy
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: film
|
||||
POSTGRES_PASSWORD: film
|
||||
POSTGRES_DB: film
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U film -d film"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
Reference in New Issue
Block a user