BinaryONe commited on
Commit
f5ad5fe
·
1 Parent(s): c1fc228

InitialCommit -Modification in Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. start_apps.sh +7 -7
Dockerfile CHANGED
@@ -34,7 +34,8 @@ RUN python3 -m venv /app/PyEnv && \
34
  RUN touch /app/flask.log && \
35
  touch /var/lib/nginx/logs/error.log && \
36
  mkdir -p /var/log/nginx /run/nginx /var/lib/nginx/logs/ && \
37
- chown -R app_user:nginx_admin /var/lib/nginx /var/log/nginx /var/lib/nginx/logs/ /app
 
38
 
39
  USER app_user
40
 
 
34
  RUN touch /app/flask.log && \
35
  touch /var/lib/nginx/logs/error.log && \
36
  mkdir -p /var/log/nginx /run/nginx /var/lib/nginx/logs/ && \
37
+ chown -R app_user:nginx_admin /var/lib/nginx /var/log/nginx /var/lib/nginx/logs/ /app &&\
38
+ chmod -R 755 /var/lib/nginx/logs/
39
 
40
  USER app_user
41
 
start_apps.sh CHANGED
@@ -3,12 +3,12 @@
3
  # Start nginx in a separate shell (background)
4
  echo "* Starting The Python Application *";
5
  (
6
- echo "* Activating virtual environment *PWD $(pwd) *"
7
- source /app/PyEnv/bin/activate
8
- echo "* Starting application *PWD $(pwd)*"
9
- cd /app || { echo "Failed to change directory to /app"; exit 1; }
10
- python3 -u -m FlaskWebApp || { echo "Failed to start WebSSH application"; exit 1; } > /app/flask.log 2>&1
11
- #python3 -u -m FlaskWebApp > /app/flask.log 2>&1
12
- ) &
13
  echo "* Starting The NGINX *";
14
  nginx -g "daemon off;" > /dev/stdout; #> /app/nginx.log 2>&1
 
3
  # Start nginx in a separate shell (background)
4
  echo "* Starting The Python Application *";
5
  (
6
+ echo "* Activating virtual environment *PWD $(pwd) *";
7
+ source /app/PyEnv/bin/activate ;
8
+ echo "* Starting application *PWD $(pwd)*";
9
+ cd /app || { echo "Failed to change directory to /app"; exit 1; } ;
10
+ python3 -u -m FlaskWebApp || { echo "Failed to start WebSSH application"; exit 1; > /dev/stdout; } > /app/flask.log 2>&1 ;
11
+ echo "* Application started as USER: $(whoami)*"; > /dev/stdout;
12
+ )
13
  echo "* Starting The NGINX *";
14
  nginx -g "daemon off;" > /dev/stdout; #> /app/nginx.log 2>&1