You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Database Volume**: The `scim_database` volume is a Docker-managed volume that persists across container restarts and reboots. This ensures your SCIM server data is preserved even when containers are recreated.
43
45
44
46
### Ports
45
47
46
48
-`7001` - Main SCIM server port
47
49
50
+
## Database Persistence
51
+
52
+
### Docker Volume Benefits
53
+
54
+
-**Persistent Storage**: Database survives container restarts and reboots
55
+
-**Isolated Storage**: Database is managed by Docker and isolated from host filesystem
56
+
-**Easy Backup**: Volume can be easily backed up using Docker commands
57
+
-**Performance**: Better I/O performance compared to bind mounts
58
+
59
+
### Managing the Database Volume
60
+
61
+
**List volumes:**
62
+
```bash
63
+
docker volume ls
64
+
```
65
+
66
+
**Inspect volume details:**
67
+
```bash
68
+
docker volume inspect scim_database
69
+
```
70
+
71
+
**Backup the database:**
72
+
```bash
73
+
docker run --rm -v scim_database:/data -v $(pwd):/backup alpine tar czf /backup/scim_database_backup.tar.gz -C /data .
74
+
```
75
+
76
+
**Restore the database:**
77
+
```bash
78
+
docker run --rm -v scim_database:/data -v $(pwd):/backup alpine tar xzf /backup/scim_database_backup.tar.gz -C /data
79
+
```
80
+
81
+
**Remove the volume (WARNING: This will delete all data):**
82
+
```bash
83
+
docker volume rm scim_database
84
+
```
85
+
48
86
## Health Checks
49
87
50
88
The container includes robust health checks that verify the application is running properly:
docker run -p 7001:7001 -v $(pwd)/scim.db:/app/scim.db -v $(pwd)/logs:/app/logs scim-server
132
+
docker run -p 7001:7001 -v scim_database:/app/db -v $(pwd)/logs:/app/logs scim-server
95
133
```
96
134
97
135
### Viewing Logs
98
136
99
137
```bash
100
138
# Docker Compose logs
101
-
docker-compose logs -f
139
+
docker-compose logs -f scim-server
102
140
103
141
# Direct container logs
104
-
docker logs scim-server
142
+
docker logs -f scim-server
105
143
```
106
144
107
-
### Checking Health Status
145
+
### Database Initialization
108
146
109
-
```bash
110
-
# Check container health status
111
-
docker ps
147
+
The container automatically initializes the database on first startup. The startup script (`start.sh`) checks if the database file exists and initializes it if needed.
112
148
113
-
# Check health check logs
114
-
docker inspect scim-server | grep -A 10 "Health"
149
+
**Manual database initialization:**
150
+
```bash
151
+
docker exec scim-server python scripts/init_db.py
115
152
```
116
153
117
-
## API Endpoints
118
-
119
-
Once running, the SCIM server will be available at:
0 commit comments