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:
+20
-15
@@ -1,20 +1,25 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { defineConfig, loadEnv } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8000',
|
||||
changeOrigin: true,
|
||||
export default defineConfig(({ mode }) => {
|
||||
// Load env file based on mode (e.g. development, production, docker)
|
||||
const env = loadEnv(mode, process.cwd())
|
||||
|
||||
return {
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: env.VITE_API_BASE_URL,
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/ws': {
|
||||
target: env.VITE_WS_BASE_URL,
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
'/ws': {
|
||||
target: "ws://localhost:8000",
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user