-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
78 lines (74 loc) · 1.89 KB
/
docker-compose.dev.yml
File metadata and controls
78 lines (74 loc) · 1.89 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
services:
# PostgreSQL Database for development
postgres:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: labschedule_dev
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_dev_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Redis Cache for development
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_dev_data:/data
# Next.js Development Server
web-dev:
build:
context: .
dockerfile: Dockerfile.dev
target: base
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- NEXTAUTH_URL=http://localhost:3000
- NEXTAUTH_SECRET=dev-secret-key
- DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}
- DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}
- DISCORD_REDIRECT_URI=http://localhost:3000/api/auth/callback/discord
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/labschedule_dev
- REDIS_URL=redis://redis:6379
volumes:
- .:/app
- /app/node_modules
- next_cache:/app/.next
depends_on:
postgres:
condition: service_healthy
command: ["npm", "run", "dev"]
# Discord Bot Development
bot-dev:
build:
context: .
dockerfile: Dockerfile.dev
target: bot
restart: unless-stopped
environment:
- NODE_ENV=development
- DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}
- DISCORD_GUILD_ID=${DISCORD_GUILD_ID}
- NEXTAUTH_URL=http://web-dev:3000
volumes:
- .:/app
- /app/node_modules
depends_on:
- web-dev
command: ["npm", "run", "dev:bot"]
volumes:
postgres_dev_data:
redis_dev_data:
next_cache: