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:
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: api/Dockerfile
|
||||
image: joelmathewthomas/freqsplit-api:latest
|
||||
container_name: freqsplit-api
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
- freqnet
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/api/ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 24
|
||||
|
||||
redis:
|
||||
image: redis:7
|
||||
container_name: freqsplit-redis
|
||||
networks:
|
||||
- freqnet
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: client/Dockerfile
|
||||
image: joelmathewthomas/freqsplit-client:latest
|
||||
container_name: freqsplit-client
|
||||
ports:
|
||||
- "80:80"
|
||||
networks:
|
||||
- freqnet
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
freqnet:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user