forked from jvm-bloggers/jvm-bloggers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjvm-bloggers.sh
executable file
·64 lines (55 loc) · 1.17 KB
/
jvm-bloggers.sh
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
#!/bin/sh
setupProperties() {
# Database settings
export JVM_BLOGGERS_DB_USER=jvm_bloggers
export JVM_BLOGGERS_DB_PASSWORD=jvm_bloggers
export JVM_BLOGGERS_DB_NAME=jvm_bloggers
export JVM_BLOGGERS_DB_PATH="~/postgresql-data/"
export JVM_BLOGGERS_DB_PUBLISHED_PORT=5432
# Core Application settings:
export JVM_BLOGGERS_CORE_IMAGE_VERSION=1.0.0-20161202-230241-fb9ffbd
export JVM_BLOGGERS_CORE_SPRING_PROFILES=dev
export JVM_BLOGGERS_CORE_ENCRYPTOR_PASSWORD=secret
export JVM_BLOGGERS_CORE_PORT=9000
export JVM_BLOGGERS_LOGSPOUT_PORT=1
}
start() {
docker-compose up -d
echo "Started JVM Bloggers"
}
stop() {
docker-compose down
}
status() {
echo "** ** ** ** ** ** ** ** ** ** ** ** "
echo "-- From docker-compose:"
docker-compose ps
echo "** ** ** ** ** ** ** ** ** ** ** ** "
echo "-- From docker itself:"
docker ps
echo "** ** ** ** ** ** ** ** ** ** ** ** "
}
logs() {
docker-compose logs
}
setupProperties
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status
;;
logs)
logs
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
esac