Fix linux permissions
This commit is contained in:
@@ -27,12 +27,11 @@ ADD ./backend/requirements.txt /execute/requirements.txt
|
|||||||
RUN pip install --no-cache-dir -r /execute/requirements.txt
|
RUN pip install --no-cache-dir -r /execute/requirements.txt
|
||||||
|
|
||||||
COPY ./backend/ /execute/
|
COPY ./backend/ /execute/
|
||||||
|
RUN c++ -O3 -o proxy/proxy proxy/proxy.cpp -pthread -lboost_system -lboost_regex
|
||||||
COPY ./config/supervisord.conf /etc/supervisor/supervisord.conf
|
COPY ./config/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
COPY ./config/nginx.conf /tmp/nginx.conf
|
COPY ./config/nginx.conf /tmp/nginx.conf
|
||||||
COPY ./config/start_nginx.sh /tmp/start_nginx.sh
|
COPY ./config/start_nginx.sh /tmp/start_nginx.sh
|
||||||
|
|
||||||
RUN c++ -O3 -o proxy/proxy proxy/proxy.cpp -pthread -lboost_system -lboost_regex
|
|
||||||
|
|
||||||
#Copy react app in the main container
|
#Copy react app in the main container
|
||||||
COPY --from=frontend /app/build/ ./frontend/
|
COPY --from=frontend /app/build/ ./frontend/
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class SQLite():
|
|||||||
try:
|
try:
|
||||||
self.conn = sqlite3.connect("db/" + self.db_name + '.db', check_same_thread = False)
|
self.conn = sqlite3.connect("db/" + self.db_name + '.db', check_same_thread = False)
|
||||||
except Exception:
|
except Exception:
|
||||||
with open(self.db_name + '.db', 'x') as f:
|
with open("db/" + self.db_name + '.db', 'x') as f:
|
||||||
pass
|
pass
|
||||||
self.conn = sqlite3.connect("db/" + self.db_name + '.db', check_same_thread = False)
|
self.conn = sqlite3.connect("db/" + self.db_name + '.db', check_same_thread = False)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
|
||||||
|
chmod g+w -R /execute/db
|
||||||
envsubst '$NGINX_PORT' < /tmp/nginx.conf > /etc/nginx/nginx.conf
|
envsubst '$NGINX_PORT' < /tmp/nginx.conf > /etc/nginx/nginx.conf
|
||||||
/usr/sbin/nginx -g "daemon off;" || exit 1
|
/usr/sbin/nginx -g "daemon off;" || exit 1
|
||||||
@@ -8,11 +8,16 @@ nodaemon = true
|
|||||||
[program:backend]
|
[program:backend]
|
||||||
directory=/execute
|
directory=/execute
|
||||||
user = nobody
|
user = nobody
|
||||||
|
group = root
|
||||||
command=python3 app.py
|
command=python3 app.py
|
||||||
startsecs=10
|
startsecs=10
|
||||||
stopsignal=QUIT
|
stopsignal=QUIT
|
||||||
stopasgroup=true
|
stopasgroup=true
|
||||||
killasgroup=true
|
killasgroup=true
|
||||||
|
stderr_logfile=/var/log/supervisor/%(program_name)s_stderr.log
|
||||||
|
stderr_logfile_maxbytes=10MB
|
||||||
|
stdout_logfile=/var/log/supervisor/%(program_name)s_stdout.log
|
||||||
|
stdout_logfile_maxbytes=10MB
|
||||||
|
|
||||||
[program:frontend]
|
[program:frontend]
|
||||||
directory=/execute
|
directory=/execute
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ function App() {
|
|||||||
return <LoadingOverlay visible/>
|
return <LoadingOverlay visible/>
|
||||||
}else if (reqError){
|
}else if (reqError){
|
||||||
return <div className='center-flex-row' style={{padding:"100px"}}>
|
return <div className='center-flex-row' style={{padding:"100px"}}>
|
||||||
<Title order={1} align="center">Errore nel caricamento del firewall! 🔥</Title>
|
<Title order={1} align="center">Error launching Firegex! 🔥</Title>
|
||||||
<Space h="md" />
|
<Space h="md" />
|
||||||
<Title order={4} align="center">Errore nella comunicazione con il backend</Title>
|
<Title order={4} align="center">Error communicating with backend</Title>
|
||||||
<Space h="md" />
|
<Space h="md" />
|
||||||
Errore: {reqError}
|
Errore: {reqError}
|
||||||
<Space h="xl" />
|
<Space h="xl" />
|
||||||
@@ -132,9 +132,9 @@ function App() {
|
|||||||
</Routes>
|
</Routes>
|
||||||
}else{
|
}else{
|
||||||
return <div className='center-flex-row' style={{padding:"100px"}}>
|
return <div className='center-flex-row' style={{padding:"100px"}}>
|
||||||
<Title order={1} align="center">Errore nel caricamento del firewall! 🔥</Title>
|
<Title order={1} align="center">Error launching Firegex! 🔥</Title>
|
||||||
<Space h="md" />
|
<Space h="md" />
|
||||||
<Title order={4} align="center">Errore nella comunicazione con il backend</Title>
|
<Title order={4} align="center">Error communicating with backend</Title>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user