forked from jvm-bloggers/jvm-bloggers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jvm-bloggers.sh
executable file
·66 lines (56 loc) · 1.21 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
65
66
#!/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="${HOME}/postgresql-data/"
export JVM_BLOGGERS_DB_PUBLISHED_PORT=5432
# Reverse proxy settings
export JVM_BLOGGERS_CADDY_PATH="${HOME}/caddy-data"
# Core Application settings:
export JVM_BLOGGERS_CORE_IMAGE_VERSION=2.0.0-20200202-180146-11c524a7
export JVM_BLOGGERS_CORE_SPRING_PROFILES=dev
export JVM_BLOGGERS_CORE_ENCRYPTOR_PASSWORD=secret
export DATADOG_API_KEY=api_key
}
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