Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dms-ui/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import routes from './routes';
const { REACT_APP_ENV = 'dev' } = process.env;

const socketServerMap = {
dev: 'http://localhost:8366/sql',
pre: 'http://localhost:8366/sql',
dev: 'http://localhost:8366',
pre: '',
// pre: 'http://dms-backend:8366/sql',
};

Expand Down Expand Up @@ -132,7 +132,7 @@ export default defineConfig({
// ],
define: {
'process.env.SOCKET_IO_SERVER':
socketServerMap[(REACT_APP_ENV as keyof typeof socketServerMap) || 'dev'],
socketServerMap[(REACT_APP_ENV as keyof typeof socketServerMap)],
},
mfsu: {
strategy: 'normal',
Expand Down
2 changes: 1 addition & 1 deletion dms-ui/src/socket.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { io } from 'socket.io-client';

export const SqlSocketCreator = () =>
io(process.env.SOCKET_IO_SERVER, {
io(process.env.SOCKET_IO_SERVER+'/sql', {
transports: ['websocket'],
});
10 changes: 8 additions & 2 deletions scripts/docker/build/dms-frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ http {
#tcp_nopush on;
keepalive_timeout 65;

upstream dms-backend {
upstream dms-backend-api {
server dms-backend:8080;
}
upstream dms-backend-socket {
server dms-backend:8366;
}

server {
listen 80;
Expand All @@ -39,21 +42,24 @@ http {
}

location /api {
proxy_pass http://dms-backend/dms/api;
proxy_pass http://dms-backend-api/dms/api;
proxy_redirect default;
proxy_cache off;
proxy_buffering off;
add_header X-Accel-Buffering no;
}

location /socket.io/ {
proxy_pass http://dms-backend-socket
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 3600s;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}

#error_page 404 /404.html;
Expand Down
25 changes: 24 additions & 1 deletion scripts/docker/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
networks:
- dms
minio:
image: bitnami/minio:2024
image: minio/minio:latest
profiles: [ "dev","prod" ]
container_name: dms_minio
environment:
Expand All @@ -57,12 +57,35 @@ services:
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
- dms
minio-client:
image: minio/mc:latest
profiles: [ "dev","prod" ]
container_name: dms_minio_client
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 admin password;
mc mb local/dms --ignore-existing;
exit 0;
"
networks:
- dms
dms-backend:
image: basedt/dms-backend
profiles: [ "prod" ]
container_name: dms_backend
volumes:
- ./application-docker.yml:/opt/app/dms/application-docker.yml
depends_on:
redis:
condition: service_started
Expand Down