-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
64 lines (54 loc) · 1.35 KB
/
docker-compose.prod.yml
File metadata and controls
64 lines (54 loc) · 1.35 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
# Docker Compose for production deployment
version: '3.8'
services:
ldap-openfga-sync:
image: ghcr.io/agdsn/ldap-openfga-sync:latest
# Or build locally:
# build: .
container_name: ldap-openfga-sync
restart: unless-stopped
# Mount environment file
env_file:
- .env
# Alternative: Use environment variables directly
# environment:
# - LDAP_SERVER=ldap://ldap.example.com:389
# - LDAP_BIND_DN=cn=admin,dc=example,dc=com
# - LDAP_BIND_PASSWORD=your-password
# - LDAP_GROUP_BASE_DN=ou=groups,dc=example,dc=com
# - OPENFGA_API_URL=http://openfga:8080
# - OPENFGA_STORE_ID=your-store-id
# - SYNC_DRY_RUN=false
# Mount logs directory
volumes:
- ./logs:/var/log/ldap-openfga-sync
# Network configuration
networks:
- ldap-network
# Resource limits
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.1'
memory: 128M
# Health check
healthcheck:
test: ["CMD", "pgrep", "entrypoint.sh"]
interval: 1h
timeout: 10s
retries: 3
start_period: 30s
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
ldap-network:
external: true
# Or create it:
# driver: bridge