Dockerize project with client and backend support (#55)
* set redis backend url automatically for docker builds * initial docker build config * rename docker scripts * fix script paths * remove old Dockerfiles * set vite proxy base url depending on mode * docker build config for client/ * docker production build for client * refactor docker files * update nginx config to set maximum file size * reduce docker image size * fix demucs bug in docker * fix proxy timeout * add gpu capabality for api container * add compose files for dev and prod * add healthcheck for freqsplit-api * add model checkpoints to api image * set healthcheck retries to 24
This commit is contained in:
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
celery -A backend worker --loglevel=info
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
daphne -b 0.0.0.0 -p 8000 --proxy-headers backend.asgi:application
|
||||
@@ -0,0 +1,28 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_read_timeout 300;
|
||||
proxy_connect_timeout 300;
|
||||
proxy_send_timeout 300;
|
||||
}
|
||||
|
||||
location /ws/ {
|
||||
proxy_pass http://backend:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Start the first process
|
||||
./celery &
|
||||
|
||||
# Start the second process
|
||||
./daphne &
|
||||
|
||||
# Wait for any process to exit
|
||||
wait -n
|
||||
|
||||
# Exit with status of process that exited first
|
||||
exit $?
|
||||
Reference in New Issue
Block a user