-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker_entrypoint.sh
73 lines (70 loc) · 1.61 KB
/
docker_entrypoint.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
70
71
72
73
#!/bin/bash
########################################
# Nativation to verify the nginx folders
########################################
echo ""
echo ""
echo "*********************"
echo " Navigation"
echo "*********************"
whoami
nginx stop
pwd
ls
cd /code
ls
cd ..
more ./generate_env-config.sh
########################################
# Create env-config.js file in the public folder
# of the ngnix server, based on the environment variables
# given by the docker run -e parameter
# - VUE_APP_ROOT
# - VUE_APP_KEYCLOAK
# - VUR_APP_WEBAPI
########################################
echo ""
echo ""
echo "*********************"
echo "Get ip address"
echo "*********************"
ip addr show
echo ""
echo ""
echo "*********************"
echo "Create ./code/env-config.js"
echo "*******Exists?*********"
cd code
ls
echo "*******Delete********"
rm env-config.js
echo "*******Deleted?********"
ls
"/bin/sh" ../generate_env-config.sh > ./env-config.js
echo "*******Generated?******"
ls
########################################
# Create env-config.js file in the public folder
# of the ngnix server
########################################
echo ""
echo ""
echo "*********************"
echo "Content ./code/env-config.js"
echo "*********************"
cd /code
more ./env-config.js
########################################
# Start ngnix server
# The configuration for the server contains also
# 'daemon off;'')
# to replace the start command for the
# container image.
# CMD ["nginx", "-g", "daemon off;"]
########################################
echo ""
echo ""
echo "*********************"
echo "Start server"
echo "*********************"
nginx