Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3.8'

services:
db:
image: postgres:15
environment:
POSTGRES_USER: devuser
POSTGRES_PASSWORD: devpassword
POSTGRES_DB: rocketdb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data

server:
image: node:20
working_dir: /app
volumes:
- ./:/app
# Map node_modules to an anonymous volume to avoid conflicts between macOS host and linux container for native bindings
- node_modules:/app/node_modules
ports:
- "3000:3000"
command: >
bash -c "npm install && npm run dev -- --config example_config.json"
depends_on:
- db
environment:
- NODE_ENV=development

volumes:
postgres_data:
node_modules:
4 changes: 2 additions & 2 deletions example_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
}
},
"database": {
"engine": "sqlite",
"engine": "pg",
"connection": {
"urlOrPath": "./database.db"
"urlOrPath": "postgres://devuser:devpassword@db:5432/rocketdb"
}
}
}
Loading
Loading