File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
src/ServiceControl.RavenDB Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ RUN chown 999:999 /var/lib/ravendb/data
1010USER ravendb
1111
1212ENV RAVEN_License_Eula_Accepted=true \
13- RAVEN_License_Path=/usr/lib/ravendb/servicecontrol-license.json \
1413 RAVEN_Setup_Mode=None
1514
1615LABEL org.opencontainers.image.source=https://github.com/Particular/ServiceControl \
Original file line number Diff line number Diff line change @@ -7,4 +7,31 @@ if [[ -d "$LEGACY_PATH" ]]; then
77 exit 1
88fi
99
10- source /usr/lib/ravendb/scripts/run-raven.sh
10+ source /usr/lib/ravendb/scripts/run-raven.sh &
11+ RAVEN_PID=$!
12+
13+ # Wait for RavenDB to be ready (with retries)
14+ echo " Waiting for RavenDB to start..."
15+ for i in {1..30}; do
16+ if curl -s http://localhost:8080/admin/stats > /dev/null 2>&1 ; then
17+ echo " RavenDB is ready!"
18+ break
19+ fi
20+ sleep 1
21+ done
22+
23+ # Register license
24+ echo " Registering license..."
25+ LICENSE_JSON=$( cat /usr/lib/ravendb/servicecontrol-license.json)
26+ RESPONSE=$( curl -s -w " \n%{http_code}" -X POST http://localhost:8080/admin/license/activate \
27+ -H " Content-Type: application/json" \
28+ -d " $LICENSE_JSON " )
29+
30+ HTTP_CODE=$( echo " $RESPONSE " | tail -n1)
31+ if [ " $HTTP_CODE " -eq 200 ] || [ " $HTTP_CODE " -eq 204 ]; then
32+ echo " License registered successfully!"
33+ else
34+ echo " Warning: License registration returned HTTP $HTTP_CODE "
35+ fi
36+
37+ wait $RAVEN_PID
You can’t perform that action at this time.
0 commit comments