.env.example is improved, comments added. docker-compose-prod.yaml is replaced with docker-compose.yaml, development version is docker-compose.override.yaml now
Build and Push Docker Image / build-and-push-backend (pull_request) Successful in 21m4s
Build and Push Docker Image / build-and-push-frontend (pull_request) Successful in 52s
Build and Push Docker Image / notify-deployment-server (pull_request) Successful in 13s

This commit is contained in:
2026-08-05 09:52:23 +05:00
parent a028b875fb
commit 7f2b82aae0
4 changed files with 63 additions and 47 deletions
+18 -3
View File
@@ -1,11 +1,26 @@
# ------------------------------------------------------------------------------
# Production Environment Variables
# ------------------------------------------------------------------------------
# Backend # Backend
DEBUG=0 DEBUG=0
MAX_UPLOAD_SIZE_MB=500 MAX_UPLOAD_SIZE_MB=500
TEMP_DIR=/tmp/audio_splitter_web
CLEANUP_AFTER_SECONDS=3600 CLEANUP_AFTER_SECONDS=3600
BACKEND_DATA_VOLUME=/tmp/audio_splitter_web
# Backend data directory (bind mount)
# This directory will store all temporary files during splitting.
# It can get large (audio files), so place it on a partition with enough space.
BACKEND_DATA_DIR=/var/lib/audio_splitter_data
# Ports
BACKEND_PORT=8000 BACKEND_PORT=8000
FRONTEND_PORT=5173
# ------------------------------------------------------------------------------
# Development Overrides (docker-compose.override.yaml)
# ------------------------------------------------------------------------------
# These are only used when docker-compose.override.yaml is present.
# They override the production settings for local development.
# Frontend (development) # Frontend (development)
VITE_BACKEND_URL=http://localhost:8000 VITE_BACKEND_URL=http://localhost:8000
FRONTEND_PORT=5173
-28
View File
@@ -1,28 +0,0 @@
services:
backend:
image: git.vmn.su/max/audio_splitter_backend:latest
ports:
- "${BACKEND_PORT}:8000"
volumes:
- "${BACKEND_DATA_VOLUME}:/tmp/audio_splitter_web"
environment:
- PYTHONUNBUFFERED=1
- DEBUG=1
restart: unless-stopped
frontend:
image: git.vmn.su/max/audio_splitter_frontend:latest
ports:
- "${FRONTEND_PORT}:80"
volumes:
- ./web/frontend:/app
- node_modules:/app/node_modules
environment:
- BACKEND_URL=http://backend:8000
- VITE_BACKEND_URL=http://backend:8000
depends_on:
- backend
restart: unless-stopped
volumes:
node_modules:
+37
View File
@@ -0,0 +1,37 @@
services:
backend:
build:
context: .
dockerfile: web/backend/Dockerfile
volumes:
# Bind mount for source code (hot-reload for Python)
- ./web/backend:/app/backend
- ./audio_splitter:/app/audio_splitter
- ./setup.py:/app/setup.py
- ./pyproject.toml:/app/pyproject.toml
# Development data directory (overrides production)
- "./dev_data:/tmp/audio_splitter_web"
environment:
- DEBUG=1
- PYTHONUNBUFFERED=1
ports:
- "8000:8000"
frontend:
build:
context: ./web/frontend
# Use the same Dockerfile, but override CMD for development
dockerfile: Dockerfile
command: ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
volumes:
# Bind mount for source code (hot-reload for Vite)
- ./web/frontend:/app
- node_modules:/app/node_modules
environment:
- BACKEND_URL=http://backend:8000
- VITE_BACKEND_URL=http://backend:8000
ports:
- "5173:5173"
volumes:
node_modules:
+8 -16
View File
@@ -1,29 +1,21 @@
services: services:
backend: backend:
build: image: git.vmn.su/max/audio_splitter_backend:latest
context: .
dockerfile: web/backend/Dockerfile
ports: ports:
- "8000:8000" - "${BACKEND_PORT:-8000}:8000"
volumes: volumes:
- /tmp/audio_splitter_web:/tmp/audio_splitter_web # Bind mount # Bind mount for persistent data storage.
# Set BACKEND_DATA_DIR in .env to point to your data directory.
- "${BACKEND_DATA_DIR:-/var/lib/audio_splitter_data}:/tmp/audio_splitter_web"
environment: environment:
- PYTHONUNBUFFERED=1 - PYTHONUNBUFFERED=1
- DEBUG=1 - DEBUG=${DEBUG:-0}
restart: unless-stopped restart: unless-stopped
frontend: frontend:
build: image: git.vmn.su/max/audio_splitter_frontend:latest
context: ./web/frontend
dockerfile: Dockerfile
ports: ports:
- "5173:80" - "${FRONTEND_PORT:-5173}:80"
volumes:
- ./web/frontend:/app
- /app/node_modules
environment:
- BACKEND_URL=http://backend:8000
- VITE_BACKEND_URL=http://backend:8000
depends_on: depends_on:
- backend - backend
restart: unless-stopped restart: unless-stopped