-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
89 lines (83 loc) · 2.07 KB
/
docker-compose.dev.yml
File metadata and controls
89 lines (83 loc) · 2.07 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
# Development docker-compose with hot reload
version: "3.8"
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: leetlab-postgres-dev
restart: unless-stopped
environment:
POSTGRES_DB: postgres
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
volumes:
- postgres_dev_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- leetlab-dev-network
# Redis Cache
redis:
image: redis:7-alpine
container_name: leetlab-redis-dev
restart: unless-stopped
command: redis-server --requirepass redispassword
volumes:
- redis_dev_data:/data
ports:
- "6379:6379"
networks:
- leetlab-dev-network
# Backend Service (Development)
backend:
build:
context: ./backend
dockerfile: Dockerfile.dev
container_name: leetlab-backend-dev
restart: unless-stopped
depends_on:
- postgres
- redis
environment:
NODE_ENV: development
PORT: 8080
DATABASE_URL: postgresql://myuser:mypassword@postgres:5432/postgres
REDIS_URL: redis://:redispassword@redis:6379
SECRET: dev-secret-key
REFRESH_SECRET: dev-refresh-secret-key
JUDGE0_API_URL: https://judge0-ce.p.sulu.sh
SULU_API_KEY: ${SULU_API_KEY}
RAZORPAY_KEY_ID: ${RAZORPAY_KEY_ID}
RAZORPAY_KEY_SECRET: ${RAZORPAY_KEY_SECRET}
volumes:
- ./backend:/app
- /app/node_modules
ports:
- "8080:8080"
networks:
- leetlab-dev-network
command: npm run dev
# Frontend Service (Development)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: leetlab-frontend-dev
restart: unless-stopped
environment:
VITE_API_URL: http://localhost:8080/api/v1
VITE_WS_URL: ws://localhost:8080
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "3000:3000"
networks:
- leetlab-dev-network
command: npm run dev
volumes:
postgres_dev_data:
redis_dev_data:
networks:
leetlab-dev-network:
driver: bridge