-
Notifications
You must be signed in to change notification settings - Fork 3
/
run-in-docker.sh
executable file
·69 lines (61 loc) · 1.66 KB
/
run-in-docker.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
67
68
69
#!/usr/bin/env bash
set -xe
if [[ \
-z $DATABASE_USER || \
-z $DATABASE_PASSWORD || \
-z $DATABASE_URL || \
-z $APPLICATION_SECRET || \
-z $MAIL_SEND_FROM || \
-z $EXPORT_SECRET || \
-z $USER_FILES_PATH \
]];
then
echo "ENVIRONMENT VARIABLES ARE UNSET"
exit 1
fi
if [ ! -f drive_service_key.json ]; then
echo "drive_service_key.json NOT FOUND"
exit 1
fi
if [ ! -f user_approved.html ]; then
echo "user_approved.html NOT FOUND"
fi
if [ ! -f user_invited.html ]; then
echo "user_invited.html NOT FOUND"
fi
sbt clean coverage test coverageReport flywayMigrate
sbt docker:publishLocal
docker rm -f private-open360-api || true
docker run -d --name private-open360-api --restart=always -p 9000:9000 \
-e DATABASE_USER \
-e DATABASE_PASSWORD \
-e DATABASE_URL \
-e APPLICATION_SECRET \
-e EXTERNAL_AUTH_SERVER_URL \
-e GOOGLE_REDIRECT_URL \
-e GOOGLE_CLIENT_ID \
-e GOOGLE_CLIENT_SECRET \
-e FACEBOOK_REDIRECT_URL \
-e FACEBOOK_CLIENT_ID \
-e FACEBOOK_CLIENT_SECRET \
-e VK_REDIRECT_URL \
-e VK_CLIENT_ID \
-e VK_CLIENT_SECRET \
-e TWITTER_CALLBACK_URL \
-e TWITTER_CONSUMER_KEY \
-e TWITTER_CONSUMER_SECRET \
-e MAIL_HOST \
-e MAIL_PORT \
-e MAIL_USER \
-e MAIL_PASSWORD \
-e MAIL_SSL \
-e MAIL_TLS \
-e MAIL_SEND_FROM \
-e EXPORT_SECRET \
-e SCHEDULER_ENABLED=true \
-e AUTO_APPROVE_USERS \
-v $(pwd)/drive_service_key.json:/opt/docker/conf/drive_service_key.json \
-v $(pwd)/user_approved.html:/opt/docker/templates/user_approved.html \
-v $(pwd)/user_invited.html:/opt/docker/templates/user_invited.html \
-v ${USER_FILES_PATH}:/opt/docker/uploads \
open360/api:latest