diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..73bb1a2 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,78 @@ +# Git +.git +.gitignore +.gitattributes + +# Python +__pycache__ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST +.pytest_cache/ +.coverage +.coverage.* +htmlcov/ + +# Virtual Environments +venv/ +ENV/ +env/ +.venv +.env +.env.local +.env.*.local + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ +.DS_Store +.ropeproject + +# Project specific +.cache/ +.ruff_cache/ +*.db +.pytest_cache/ + +# Docker +.docker +.dockerignore +Dockerfile + +# Build artifacts +.flatpak-builder/ +build-dir/ + +# Node (если используется) +node_modules/ +npm-debug.log +yarn-error.log + +# OS +.DS_Store +Thumbs.db + +# app +tests/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b5df75f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.12.0-slim + +WORKDIR /app + +ENV PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 + +COPY . /app + +RUN pip install poetry + +RUN poetry config virtualenvs.create false && \ + poetry install --no-interaction --no-ansi \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..680cad4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,15 @@ +services: + app: + build: . + image: arduinum628/web-robot-control-app:latest + container_name: web_robot_control + command: poetry run start_app + env_file: + - .env + ports: + - "${PORT_APP}:${PORT_APP}" + volumes: + - app:/app + +volumes: + app: \ No newline at end of file