-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
123 lines (116 loc) · 3.49 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
123 lines (116 loc) · 3.49 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: chemquest-postgres-dev
environment:
POSTGRES_DB: chemquest_db
POSTGRES_USER: chemquest_user
POSTGRES_PASSWORD: dev_password_123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- chemquest-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U chemquest_user -d chemquest_db"]
interval: 30s
timeout: 10s
retries: 3
# Redis Cache
redis:
image: redis:7-alpine
container_name: chemquest-redis-dev
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- chemquest-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
# Backend Server (Development)
server:
build:
context: ./server
dockerfile: Dockerfile.dev
container_name: chemquest-server-dev
environment:
NODE_ENV: development
PORT: 5000
DATABASE_URL: postgresql://chemquest_user:dev_password_123@postgres:5432/chemquest_db
REDIS_URL: redis://redis:6379
JWT_SECRET: dev_jwt_secret_key_very_long_and_secure
CLIENT_URL: http://localhost:3000
# Email Configuration for Development (using Ethereal Email)
# EMAIL_HOST: smtp.ethereal.email
# EMAIL_PORT: 587
# EMAIL_USER: dev_email_user
# EMAIL_PASS: dev_email_pass
# EMAIL_FROM: noreply@chemquest.dev
# Temporarily disable email for development due to Brevo compliance issues
# EMAIL_HOST: smtp-relay.brevo.com
# EMAIL_PORT: 587
# EMAIL_PASS: hPOgRQNmVzGY4BDA
# EMAIL_USER: 96751d002@smtp-brevo.com
# EMAIL_FROM: support@gamifiedchemistry.xyz
# Email will fall back to console logging
# For development, we'll use console logging instead of real emails
ports:
- "5000:5000"
volumes:
- ./server/src:/app/src
- ./server/tsconfig.json:/app/tsconfig.json
- ./server/package.json:/app/package.json
- server_node_modules:/app/node_modules
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- chemquest-network
# Frontend Client (Development)
client:
build:
context: ./client
dockerfile: Dockerfile.dev
container_name: chemquest-client-dev
environment:
VITE_API_URL: http://localhost:5000/api
VITE_API_URL_INTERNAL: http://server:5000/api
CHOKIDAR_USEPOLLING: true
# WATCHPACK_POLLING: true
ports:
- "3000:3000"
volumes:
# Mount client-specific files only
- ./client/src:/app/src
- ./client/public:/app/public
- ./client/index.html:/app/index.html
- ./client/vite.config.ts:/app/vite.config.ts
- ./client/tsconfig.json:/app/tsconfig.json
- ./client/tsconfig.node.json:/app/tsconfig.node.json
- ./client/package.json:/app/package.json
- ./client/tailwind.config.ts:/app/tailwind.config.ts
- ./client/postcss.config.js:/app/postcss.config.js
# Use a named volume for node_modules to avoid overwriting it
- client_node_modules:/app/node_modules
depends_on:
- server
networks:
- chemquest-network
volumes:
postgres_data:
redis_data:
client_node_modules:
server_node_modules:
networks:
chemquest-network:
driver: bridge