-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
139 lines (125 loc) · 3.88 KB
/
docker-compose.dev.yml
File metadata and controls
139 lines (125 loc) · 3.88 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Development Docker Compose - extends base docker-compose.yml
services:
# PostgreSQL Database (Development)
postgres:
environment:
POSTGRES_PASSWORD: authly_dev_password
ports:
- "5432:5432"
volumes:
- postgres_dev_data:/var/lib/postgresql/data
- ./docker-postgres/init-db-and-user.sql:/docker-entrypoint-initdb.d/01-init-db.sql:ro
# Mount development SQL scripts
- ./docker-postgres/dev-data:/docker-entrypoint-initdb.d/dev:ro
# Redis Cache (Development)
redis:
environment:
REDIS_PASSWORD: redis_dev_password
ports:
- "6379:6379"
volumes:
- redis_dev_data:/data
# Authly Application (Development)
authly:
build:
context: .
dockerfile: Dockerfile
target: production
environment:
# Resource Manager Configuration (Production mode for container stability)
AUTHLY_MODE: "production"
AUTHLY_BOOTSTRAP_ENABLED: "true"
# Development Database
DATABASE_URL: "postgresql://authly:authly_dev_password@postgres:5432/authly"
# Development Redis (optional - enable features for testing)
AUTHLY_REDIS_URL: "redis://:redis_dev_password@redis:6379/0"
AUTHLY_REDIS_RATE_LIMIT: "true"
AUTHLY_REDIS_CACHE: "true"
AUTHLY_REDIS_SESSION: "false" # Keep sessions in database for development
# Development JWT Secrets (INSECURE - for development only)
JWT_SECRET_KEY: "dev-secret-key-do-not-use-in-production"
JWT_REFRESH_SECRET_KEY: "dev-refresh-secret-key-do-not-use-in-production"
# Development Logging and Debug Settings
LOG_LEVEL: "DEBUG"
AUTHLY_LOG_LEVEL: "DEBUG"
# Development URLs
DEFAULT_API_URL: "http://localhost:8000"
DEFAULT_ISSUER_URL: "http://localhost:8000"
# Relaxed rate limiting for development
RATE_LIMIT_MAX_REQUESTS: "1000"
RATE_LIMIT_WINDOW_SECONDS: "60"
# Enable admin API with relaxed restrictions
AUTHLY_ADMIN_API_ENABLED: "true"
AUTHLY_ADMIN_API_LOCALHOST_ONLY: "false"
ports:
- "8000:8000"
volumes:
# Mount source code for hot reloading (development only)
- ./src:/app/src:ro
- ./docker:/app/docker:ro
# Development logs
- authly_dev_logs:/app/logs
command: ["python", "-m", "authly", "serve", "--host", "0.0.0.0", "--port", "8000"]
# Development Database Admin (pgAdmin)
pgadmin:
image: dpage/pgadmin4:latest
container_name: authly-pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: admin@authly.dev
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
ports:
- "5050:80"
volumes:
- pgadmin_dev_data:/var/lib/pgadmin
- ./docker-compose/pgadmin/servers.json:/pgadmin4/servers.json:ro
networks:
- authly_network
depends_on:
- postgres
restart: unless-stopped
# Redis Commander (Redis Web UI)
redis-commander:
image: rediscommander/redis-commander:latest
container_name: authly-redis-commander
environment:
REDIS_HOSTS: "local:redis:6379:0:redis_dev_password"
HTTP_USER: admin
HTTP_PASSWORD: admin
ports:
- "8081:8081"
networks:
- authly_network
depends_on:
- redis
restart: unless-stopped
profiles:
- admin
# Mailhog (Email testing)
mailhog:
image: mailhog/mailhog:latest
container_name: authly-mailhog
ports:
- "1025:1025" # SMTP
- "8025:8025" # Web UI
networks:
- authly_network
restart: unless-stopped
# Networks (inherited from base)
networks:
authly_network:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
# Development-specific volumes
volumes:
postgres_dev_data:
driver: local
redis_dev_data:
driver: local
authly_dev_logs:
driver: local
pgadmin_dev_data:
driver: local