-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
68 lines (63 loc) · 1.97 KB
/
docker-compose.dev.yml
File metadata and controls
68 lines (63 loc) · 1.97 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
# Development override - use with: docker compose -f docker-compose.yml -f docker-compose.dev.yml up
#
# Quick Start:
# 1. Run: docker compose -f docker-compose.yml -f docker-compose.dev.yml up
# 2. Run migrations: docker compose exec backend alembic upgrade head
# 3. Access: http://localhost:3000
#
# Hot reload is enabled for both frontend and backend - no rebuilds needed.
#
# Optional HTTPS (via Caddy):
# 1. Add to /etc/hosts: 127.0.0.1 wardrobe.local
# 2. Change NEXTAUTH_URL below to https://wardrobe.local
# 3. Access: https://wardrobe.local (accept self-signed cert warning)
services:
# Caddy reverse proxy with automatic HTTPS
caddy:
image: caddy:2-alpine
container_name: wardrobe-caddy
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile.dev:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- frontend
- backend
restart: unless-stopped
backend:
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
volumes:
- ./backend:/app
- wardrobe_data:/data/wardrobe
environment:
DEBUG: "true"
DATABASE_ECHO: "false"
TEST_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-wardrobe}:${POSTGRES_PASSWORD:-wardrobe}@postgres:5432/wardrobe_test
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
environment:
NODE_ENV: development
# For local dev, use http://localhost:3000 (simpler, no cert issues)
NEXTAUTH_URL: http://localhost:3000
BACKEND_URL: http://backend:8000
WATCHPACK_POLLING: "true"
worker:
command: watchfiles --filter python "arq app.workers.worker.WorkerSettings" /app
volumes:
- ./backend:/app
- wardrobe_data:/data/wardrobe
environment:
DEBUG: "true"
DATABASE_ECHO: "false"
volumes:
caddy_data:
caddy_config:
frontend_node_modules: