add docker-compose.yml

This commit is contained in:
austnv
2026-06-14 14:31:03 +03:00
parent 96c453f308
commit a8ed704f47
5 changed files with 28 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
3.14 3.12
+24
View File
@@ -0,0 +1,24 @@
services:
backend:
image: python:3.12-alpine
container_name: uvpn-backend
working_dir: /app
volumes:
- ./backend:/app
- /app/.venv
environment:
- UV_COMPILE_BYTECODE=1
- UV_LINK_MODE=copy
expose:
- 8000
command: >
sh -c "pip install --no-cache-dir uv &&
uv sync --frozen &&
fastapi run"
networks:
- remnawave-network
restart: always
networks:
remnawave-network:
external: true
+1 -4
View File
@@ -1,6 +1,5 @@
from fastapi import FastAPI from fastapi import FastAPI
import tomllib import tomllib
import uvicorn
from .routers import ip from .routers import ip
@@ -15,6 +14,4 @@ app = FastAPI(
version=get_version_from_pyproject() version=get_version_from_pyproject()
) )
app.include_router(ip.router) app.include_router(ip.router)
uvicorn.run(app, host='0.0.0.0', port=8443)
+1 -1
View File
@@ -3,7 +3,7 @@ name = "uvpn-backend"
version = "0.1.0" version = "0.1.0"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.14" requires-python = ">=3.12"
dependencies = [ dependencies = [
"bs4>=0.0.2", "bs4>=0.0.2",
"fastapi[standard]>=0.136.3", "fastapi[standard]>=0.136.3",
+1 -1
View File
@@ -151,7 +151,7 @@ class IPInfo:
# ==================== Роутер ==================== # ==================== Роутер ====================
router = APIRouter(prefix='api/v1', tags=['ip']) router = APIRouter(prefix='/api/v1', tags=['ip'])
@router.get('/ip', response_model=IPInfoModel) @router.get('/ip', response_model=IPInfoModel)
async def get_ip(request: Request): async def get_ip(request: Request):