Add multi-service Docker setup, Postgres migrations, and messaging API cleanup

This commit is contained in:
2026-01-16 00:25:22 +03:00
Unverified
parent 0b683e3c83
commit 618f55e057
22 changed files with 473 additions and 154 deletions
+4 -1
View File
@@ -33,7 +33,10 @@ RUN npm run build
# 3. Put it all together
FROM node:24-slim
# 3.1. Non-root user
# 3.1. Install curl for health checks
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# 3.2. Non-root user
RUN useradd -u 1001 app && \
mkdir -p /app && \
chown -R app /app && \
+7
View File
@@ -5,6 +5,7 @@ import { resolve } from 'path';
const app = express();
const port = process.env.PORT || 3000;
const backendHost = process.env.BACKEND_HOST || "http://localhost:8300";
const fileStorageHost = process.env.FILE_STORAGE_HOST || "http://localhost:8302";
const filePath = process.env.STATIC_FILE_PATH || ".";
// API proxy middleware
@@ -15,6 +16,12 @@ app.use('/api', createProxyMiddleware({
ws: true
}));
// File serving proxy middleware
app.use('/uploads/files', createProxyMiddleware({
target: fileStorageHost,
changeOrigin: true
}));
// Serve static files
app.use(express.static(resolve(filePath)));