add docker commands
This commit is contained in:
9
.env
9
.env
@ -2,12 +2,21 @@
|
||||
# Format: postgresql://<user>:<password>@<host>:<port>/<database>
|
||||
DATABASE_URL=postgresql://postgres:password@localhost:5432/tt_tournament
|
||||
|
||||
DB_USER=postgres
|
||||
DB_HOST=localhost
|
||||
DB_DATABASE=todo_app_db
|
||||
DB_PASSWORD=password
|
||||
DB_PORT=5432 # Default PostgreSQL port
|
||||
|
||||
# JWT Secret Key (change this to a long, random, secure string)
|
||||
JWT_SECRET=jif32r7fFEKMh75jrfIHNF8i5hnik9HToB7540VF3gaf
|
||||
|
||||
# Port the application will run on
|
||||
PORT=3000
|
||||
|
||||
NODE_ENV=development # Set to 'production' in production environment
|
||||
|
||||
|
||||
# Optional: Database Backup Configuration
|
||||
# BACKUP_PATH=/path/to/your/backup/directory
|
||||
# BACKUP_INTERVAL_MINUTES=1440 # e.g., 1440 for daily backups
|
||||
|
@ -6,6 +6,9 @@
|
||||
"scripts": {
|
||||
"start": "node server.js",
|
||||
"dev": "nodemon server.js",
|
||||
"create-db-container": "docker compose -f \"docker-compose.yml\" up -d --build",
|
||||
"db:create": "docker exec -i postgresql psql -U postgres -c \"CREATE DATABASE todo_app_db;\"",
|
||||
"db:init": "docker cp db/init_postgres.sql postgresql:/tmp/init.sql && docker exec -i postgresql psql -U postgres -d todo_app_db -f /tmp/init.sql",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"generate-cert": "node src/utils/generateCertificate.js"
|
||||
},
|
||||
|
Reference in New Issue
Block a user