Skip to content

Commit d10f125

Browse files
committed
refactor: reorganize codebase with multi-stage Docker builds and improved server initialization
1 parent dbe0c11 commit d10f125

File tree

19 files changed

+808
-368
lines changed

19 files changed

+808
-368
lines changed

.docker/redis/redis.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Redis configuration for Docker environment
2+
# Reduce log verbosity
3+
loglevel warning
4+
5+
# Configure saves with less frequent snapshots
6+
save 900 1
7+
save 300 10
8+
save 60 10000
9+
10+
# Disable some features that require memory overcommit
11+
stop-writes-on-bgsave-error no
12+
13+
# Memory management
14+
maxmemory-policy allkeys-lru

.env.prod.example

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Production Environment Variables
2+
# Copy this to .env.prod and fill in your production values
3+
4+
NODE_ENV=production
5+
6+
# Backend URLs
7+
REMOTE_BACKEND_HOST_URL=https://api.yourdomain.com
8+
LOCAL_BACKEND_HOST_URL=http://api:4005
9+
FRONTEND_REDIRECT_URL=https://yourdomain.com
10+
11+
# Discord OAuth
12+
DISCORD_OAUTH_REDIRECT_URL=https://api.yourdomain.com/auth/discord/callback
13+
DISCORD_CLIENT_ID=your_discord_client_id
14+
DISCORD_AUTH_CLIENT_ID=your_discord_auth_client_id
15+
DISCORD_AUTH_CLIENT_SECRET=your_discord_auth_client_secret
16+
DISCORD_OAUTH_SCOPES=identify email guilds
17+
18+
# JWT Configuration
19+
JWT_SECRET=your_strong_random_jwt_secret_here
20+
JWT_MAX_AGE=86400000
21+
22+
# CORS Configuration
23+
CORS_ORIGIN_LIST=https://yourdomain.com,https://www.yourdomain.com
24+
25+
# Database (Production)
26+
PG_DB_URL_LOCAL=postgresql://postgres:your_strong_password@db:5432/taskcord
27+
PG_DB_URL_PROD=postgresql://postgres:your_strong_password@db:5432/taskcord
28+
POSTGRES_PASSWORD=your_strong_password
29+
30+
# Redis (Production)
31+
REDIS_URL_LOCAL=redis://redis:6379
32+
REDIS_URL_PROD=redis://redis:6379
33+
34+
# Application Port
35+
PORT=4005

.vscode/settings.json

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
// {
2-
// "eslint.workingDirectories": [
3-
// {
4-
// "mode": "auto"
5-
// }
6-
// ],
7-
// "editor.codeActionsOnSave": {
8-
// "source.fixAll": "always",
9-
// "source.fixAll.eslint": "always"
10-
// },
11-
// "eslint.validate": [
12-
// "javascript",
13-
// "javascriptreact",
14-
// "typescript",
15-
// "typescriptreact"
16-
// ],
17-
// "eslint.format.enable": false,
18-
// "editor.formatOnSave": true,
19-
// "editor.defaultFormatter": "esbenp.prettier-vscode"
20-
// }
21-
221
{
232
"editor.formatOnPaste": true,
243
"editor.fontSize": 13,
@@ -94,7 +73,7 @@
9473
"**/CVS": true,
9574
"**/.DS_Store": true,
9675
"**/tmp": true,
97-
"**/node_modules": true,
76+
// "**/node_modules": true,
9877
"**/bower_components": true,
9978
"**/dist": true
10079
},

0 commit comments

Comments
 (0)