-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
123 lines (107 loc) · 3.27 KB
/
docker-compose.yml
File metadata and controls
123 lines (107 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
services:
# PostgreSQL Database
postgres:
image: postgres:15
container_name: authkit_postgres
restart: unless-stopped
environment:
POSTGRES_DB: authkit
POSTGRES_USER: authkit_user
POSTGRES_PASSWORD: authkit_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U authkit_user -d authkit"]
interval: 10s
timeout: 5s
retries: 5
networks:
- authkit_network
# AuthKit Backend API Server
backend:
image: node:18
container_name: authkit_backend
restart: unless-stopped
working_dir: /app
command: sh -c "npm install && npm run dev"
ports:
- "5000:3000"
environment:
# ⚠️ CRITICAL WARNING ⚠️
COMPOSE_ENV: "DEMO MODE: Credentials are hardcoded for demo only"
# Database Configuration
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: authkit
DB_USER: authkit_user
DB_PASSWORD: authkit_password
# JWT Configuration
JWT_SECRET: your-super-secret-jwt-key-change-in-production-min-32-chars
JWT_REFRESH_SECRET: your-super-secret-refresh-key-change-in-production-min-32
JWT_EXPIRES_IN: 15m
JWT_EXPIRATION: 900
JWT_REFRESH_EXPIRES_IN: 7d
# Cookie Security
COOKIE_SECRET: your-super-secret-cookie-key-change-in-production-min-32-chars
# Server Configuration
NODE_ENV: development
PORT: 3000
# ⚠️ WARNING: FOR DEMO ONLY - NEVER USE IN PRODUCTION ⚠️
# These are hardcoded demo credentials for development/testing
# Replace with real Google OAuth credentials in production
GOOGLE_CLIENT_ID: AUTHKIT_DEMO_CLIENT_ID
GOOGLE_CLIENT_SECRET: AUTHKIT_DEMO_SECRET
GOOGLE_REDIRECT_URI: http://localhost:5000/api/auth/google/callback
# CORS Configuration
CORS_ORIGIN: http://localhost:3000
# Rate Limiting
RATE_LIMIT_WINDOW_MS: 900000
RATE_LIMIT_MAX_REQUESTS: 100
depends_on:
postgres:
condition: service_healthy
volumes:
- ./:/app
- /app/node_modules
- /app/frontend/node_modules
networks:
- authkit_network
# AuthKit Frontend (React)
frontend:
image: node:18
container_name: authkit_frontend
restart: unless-stopped
working_dir: /app/frontend
command: sh -c "npm install && npm start"
ports:
- "3000:3000"
environment:
# Demo Login Credentials (pre-configured)
REACT_APP_DEMO_EMAIL: demo@authkit.com
REACT_APP_DEMO_PASSWORD: password
# API Configuration
REACT_APP_API_URL: http://localhost:5000
# Demo Mode Warning
REACT_APP_DEMO_MODE: "true"
REACT_APP_WARNING: "DEMO MODE: Using hardcoded credentials for testing only"
# Development Settings
CHOKIDAR_USEPOLLING: "true"
WATCHPACK_POLLING: "true"
depends_on:
- backend
volumes:
- ./frontend:/app/frontend
- /app/frontend/node_modules
networks:
- authkit_network
stdin_open: true
tty: true
volumes:
postgres_data:
driver: local
networks:
authkit_network:
driver: bridge