Skip to content

Commit

Permalink
feat: add docker build in npm
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoAseff authored Dec 31, 2024
1 parent 7186374 commit adb624f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
node_modules
12 changes: 0 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
services:
app:
build: .
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgresql://postgres:local_password@db:5432/nova?schema=public
depends_on:
- db
volumes:
- .:/app
- /app/node_modules

db:
image: postgres:15
ports:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"dev": "npm run services:up && next dev",
"build": "next build",
"services:up": "docker compose up -d",
"scan": "next dev & npx react-scan@latest localhost:3000",
"db:generate": "prisma migrate dev",
"db:migrate": "prisma migrate deploy",
Expand Down

0 comments on commit adb624f

Please sign in to comment.