forked from ONLYOFFICE/DocumentServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·107 lines (91 loc) · 2.95 KB
/
dev.sh
File metadata and controls
executable file
·107 lines (91 loc) · 2.95 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
#!/bin/bash
# ONLYOFFICE DocumentServer Development Helper Script
set -e
COMPOSE="docker-compose"
show_help() {
echo "ONLYOFFICE DocumentServer Development Helper"
echo ""
echo "Usage: ./dev.sh [command]"
echo ""
echo "Commands:"
echo " start - Build and start all services"
echo " stop - Stop all services"
echo " restart - Restart all services"
echo " clean - Stop and remove all containers and volumes"
echo " logs - Show logs from all services"
echo " shell - Open shell in documentserver container"
echo " build-sdkjs - Rebuild sdkjs"
echo " build-webapp - Rebuild web-apps"
echo " build-server - Rebuild server"
echo " build-all - Rebuild all components"
echo " status - Show service status"
echo " help - Show this help message"
echo ""
}
case "$1" in
start)
echo "Building and starting ONLYOFFICE DocumentServer..."
$COMPOSE up --build -d
echo "Services started! Access at http://localhost:8080"
;;
stop)
echo "Stopping services..."
$COMPOSE stop
;;
restart)
echo "Restarting services..."
$COMPOSE restart
;;
clean)
echo "Cleaning up containers and volumes..."
$COMPOSE down -v
echo "Cleanup complete!"
;;
logs)
$COMPOSE logs -f
;;
shell)
echo "Opening shell in documentserver container..."
$COMPOSE exec documentserver bash
;;
build-sdkjs)
echo "Rebuilding sdkjs..."
$COMPOSE exec documentserver sh -c "cd /app/DocumentServer/sdkjs && make"
echo "Restarting services..."
$COMPOSE restart documentserver
echo "Done!"
;;
build-webapp)
echo "Rebuilding web-apps..."
$COMPOSE exec documentserver sh -c "cd /app/DocumentServer/web-apps && make"
echo "Restarting services..."
$COMPOSE restart documentserver
echo "Done!"
;;
build-server)
echo "Rebuilding server..."
$COMPOSE exec documentserver sh -c "cd /app/DocumentServer/server && make"
echo "Restarting services..."
$COMPOSE restart documentserver
echo "Done!"
;;
build-all)
echo "Rebuilding all components..."
$COMPOSE exec documentserver sh -c "cd /app/DocumentServer/sdkjs && make"
$COMPOSE exec documentserver sh -c "cd /app/DocumentServer/web-apps && make"
$COMPOSE exec documentserver sh -c "cd /app/DocumentServer/server && make"
echo "Restarting services..."
$COMPOSE restart documentserver
echo "All components rebuilt!"
;;
status)
echo "Service status:"
$COMPOSE ps
echo ""
echo "Internal service status:"
$COMPOSE exec documentserver supervisorctl status
;;
help|*)
show_help
;;
esac