-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·37 lines (28 loc) · 804 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·37 lines (28 loc) · 804 Bytes
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
#!/bin/bash
#
# docker entrypoint file for developing and testing OpenL2M sources.
#
# Note: this is NOT meant to become a production setup!!!
#
echo "Starting OpenL2M initialization..."
# the directory where the Django projec starts:
BASEDIR=/opt/openl2m/openl2m
# Python version to install and use:
PYTHON3=python3
PIP3=pip3
echo "Working dir:"
pwd
./upgrade.sh
echo "Initialization done!"
echo "OpenL2M will now start FOR DEVELOPMENT PURPOSES ONLY!"
# Activate the virtual environment
source "venv/bin/activate"
while true
do
$PYTHON3 openl2m/manage.py runserver 0:8000 --insecure
echo
echo "Development server exited, likely due to a coding error!"
echo "Restarting in 10 seconds, please fix your code..."
sleep 10
echo "Restarting Django development server..."
done