From 89c7682f6e51e2c15eb7d4f6d2d742472fd9bf93 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 13 Feb 2026 21:38:29 +0300 Subject: [PATCH 01/23] Duplicate code remove --- frontend/packages/admin/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/frontend/packages/admin/Dockerfile b/frontend/packages/admin/Dockerfile index ecd0492..69083bb 100644 --- a/frontend/packages/admin/Dockerfile +++ b/frontend/packages/admin/Dockerfile @@ -4,11 +4,6 @@ WORKDIR /app COPY package.json ./ -RUN echo "packages:" > pnpm-workspace.yaml && \ - echo " - 'packages/*'" >> pnpm-workspace.yaml - -COPY package.json ./ - RUN echo "packages:" > pnpm-workspace.yaml && \ echo " - 'packages/*'" >> pnpm-workspace.yaml From 073b1eab5b4c72c18313da132ee664fee7c46ffd Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 13 Feb 2026 21:39:18 +0300 Subject: [PATCH 02/23] The debug code has been remove --- frontend/packages/web/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/packages/web/Dockerfile b/frontend/packages/web/Dockerfile index 7067573..a85775a 100644 --- a/frontend/packages/web/Dockerfile +++ b/frontend/packages/web/Dockerfile @@ -13,8 +13,6 @@ RUN echo "link-workspace-packages=true" > .npmrc && \ COPY packages ./packages -RUN ls -la packages/ui/package.json - RUN pnpm install RUN pnpm --filter web build From a8cf31141e219c407cef6e10b94231fa23206a6b Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 13 Feb 2026 23:48:33 +0300 Subject: [PATCH 03/23] Add binaryTargets --- server/prisma/schema.prisma | 1 + 1 file changed, 1 insertion(+) diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index add93b1..fbb0329 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -3,6 +3,7 @@ generator client { provider = "prisma-client-js" + binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"] } datasource db { From 89b8b430699a0f4e31c042a2551540aee8164b95 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Tue, 24 Mar 2026 21:19:43 +0300 Subject: [PATCH 04/23] Added memory limit for admin and web --- frontend/packages/admin/Dockerfile | 1 + frontend/packages/web/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/packages/admin/Dockerfile b/frontend/packages/admin/Dockerfile index 69083bb..94bfd2b 100644 --- a/frontend/packages/admin/Dockerfile +++ b/frontend/packages/admin/Dockerfile @@ -15,6 +15,7 @@ COPY packages ./packages RUN pnpm install +ENV NODE_OPTIONS="--max-old-space-size=4096" RUN pnpm --filter admin build FROM nginx:alpine diff --git a/frontend/packages/web/Dockerfile b/frontend/packages/web/Dockerfile index a85775a..7d920d9 100644 --- a/frontend/packages/web/Dockerfile +++ b/frontend/packages/web/Dockerfile @@ -15,6 +15,7 @@ COPY packages ./packages RUN pnpm install +ENV NODE_OPTIONS="--max-old-space-size=4096" RUN pnpm --filter web build FROM nginx:alpine From 9fe70b606075a1ccaa5ee526df82047c25d7c239 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Wed, 25 Mar 2026 11:40:16 +0300 Subject: [PATCH 05/23] Added caching and deployment to a virtual machine --- .github/workflows/practika.yml | 66 +++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index c384f02..4dfeb5d 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -2,64 +2,90 @@ name: Build and Publish on: push: - branches: [ "practika-develop" ] + branches: ["practika-develop", "develop"] jobs: build-server: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push Server - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ./server push: true tags: ${{ secrets.DOCKER_USERNAME }}/eduplatform-server:latest + cache-from: type=gha + cache-to: type=gha,mode=max build-web: + needs: build-server runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push Web - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ./frontend file: frontend/packages/web/Dockerfile push: true tags: ${{ secrets.DOCKER_USERNAME }}/eduplatform-web:latest + cache-from: type=gha + cache-to: type=gha,mode=max build-admin: + needs: build-web runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 - + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push Admin - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ./frontend file: frontend/packages/admin/Dockerfile push: true - tags: ${{ secrets.DOCKER_USERNAME }}/eduplatform-admin:latest \ No newline at end of file + tags: ${{ secrets.DOCKER_USERNAME }}/eduplatform-admin:latest + cache-from: type=gha + cache-to: type=gha,mode=max + + deploy-to-vm: + needs: build-admin + runs-on: ubuntu-latest + steps: + - name: Deploy via SSH + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.SSH_PASSPHRASE }} + script: | + docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + + docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-server:latest + docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-web:latest + docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-admin:latest + + docker compose up -d --remove-orphans + + docker image prune -f \ No newline at end of file From 46775fb54a904bba690527c0d849e0150445fcf7 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 27 Mar 2026 09:58:14 +0300 Subject: [PATCH 06/23] Added telegram bot build and deploy --- .github/workflows/practika.yml | 24 +++++++++++++++++++++++- server/docker-compose.yml | 12 ++++++++++++ tgbot/DockerFile | 9 +++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 tgbot/DockerFile diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index 4dfeb5d..bc23619 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -69,9 +69,30 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - deploy-to-vm: + build-tgbot: needs: build-admin runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push Bot + uses: docker/build-push-action@v5 + with: + context: ./tgbot + push: true + tags: ${{ secrets.DOCKER_USERNAME }}/eduplatform-tgbot:latest + cache-from: type=gha + cache-to: type=gha,mode=max + + deploy-to-vm: + needs: build-tgbot + runs-on: ubuntu-latest steps: - name: Deploy via SSH uses: appleboy/ssh-action@master @@ -85,6 +106,7 @@ jobs: docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-server:latest docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-web:latest docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-admin:latest + docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-tgbot:latest docker compose up -d --remove-orphans diff --git a/server/docker-compose.yml b/server/docker-compose.yml index ff10f9b..23efa4c 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -55,6 +55,18 @@ services: - ./prisma:/app/prisma command: sh -c "npx prisma migrate deploy && npm run start:prod" +tgbot: + image: ${{ secrets.DOCKER_USERNAME }}/eduplatform-tgbot:latest + container_name: quiz-platform-tgbot + environment: + TG_BOT_TOKEN: ${TG_BOT_TOKEN:-"bot_token"} + TEACHER_CODE: ${TEACHER_CODE:-"secret_code"} + PLATFORM_ADDRESS_SERVER: ${PLATFORM_ADDRESS_SERVER:-"http://server:3000"} + PLATFORM_ADDRESS_CLIENT: ${PLATFORM_ADDRESS_CLIENT:-"http://localhost:8080"} + depends_on: + - server + restart: always + volumes: postgres_data: redis_data: diff --git a/tgbot/DockerFile b/tgbot/DockerFile new file mode 100644 index 0000000..81a9e55 --- /dev/null +++ b/tgbot/DockerFile @@ -0,0 +1,9 @@ +FROM python:3.10-slim + +WORKDIR /app + +COPY uni_eduplatform_bot.py . + +RUN pip install pyTelegramBotAPI requests python-dotenv + +CMD ["python", "uni_eduplatform_bot.py"] \ No newline at end of file From 16467cb913fafeff5d2e8fa2099a079aacaf407a Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 27 Mar 2026 15:44:35 +0300 Subject: [PATCH 07/23] Removed code that was added by mistake and moved to the correct file --- server/docker-compose.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/server/docker-compose.yml b/server/docker-compose.yml index 23efa4c..ff10f9b 100644 --- a/server/docker-compose.yml +++ b/server/docker-compose.yml @@ -55,18 +55,6 @@ services: - ./prisma:/app/prisma command: sh -c "npx prisma migrate deploy && npm run start:prod" -tgbot: - image: ${{ secrets.DOCKER_USERNAME }}/eduplatform-tgbot:latest - container_name: quiz-platform-tgbot - environment: - TG_BOT_TOKEN: ${TG_BOT_TOKEN:-"bot_token"} - TEACHER_CODE: ${TEACHER_CODE:-"secret_code"} - PLATFORM_ADDRESS_SERVER: ${PLATFORM_ADDRESS_SERVER:-"http://server:3000"} - PLATFORM_ADDRESS_CLIENT: ${PLATFORM_ADDRESS_CLIENT:-"http://localhost:8080"} - depends_on: - - server - restart: always - volumes: postgres_data: redis_data: From 59d4d98d394f8053b7ff1a914f039521564de7d6 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 27 Mar 2026 16:14:37 +0300 Subject: [PATCH 08/23] Old versions of files have been removed --- Dockerfile | 64 --------------------------------- Dockerfile.bot | 10 ------ Dockerfile.frontend | 29 --------------- Dockerfile.server | 32 ----------------- docker-entrypoint-server.sh | 14 -------- docker-entrypoint.sh | 72 ------------------------------------- 6 files changed, 221 deletions(-) delete mode 100644 Dockerfile delete mode 100644 Dockerfile.bot delete mode 100644 Dockerfile.frontend delete mode 100644 Dockerfile.server delete mode 100644 docker-entrypoint-server.sh delete mode 100644 docker-entrypoint.sh diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a08331a..0000000 --- a/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -# Multi-stage Dockerfile -# Builder: build frontends (pnpm) and server (npm) -FROM node:18-bullseye AS builder -WORKDIR /build - -# Install pnpm (via corepack) for frontend workspace builds -RUN corepack enable && corepack prepare pnpm@latest --activate - -# Copy frontend workspace and build -COPY frontend ./frontend -WORKDIR /build/frontend -RUN pnpm install --frozen-lockfile --network-concurrency 1 || pnpm install -RUN pnpm run build:all - -# Build server -WORKDIR /build -COPY server ./server -WORKDIR /build/server -RUN npm ci --no-audit --no-fund -RUN npm run build - -# Keep server node_modules to avoid re-install in final image - -# Final image: runtime with node + python for bot -FROM node:18-bullseye-slim - -ENV NODE_ENV=production - -WORKDIR /app - -# Install python for bot -RUN apt-get update && apt-get install -y --no-install-recommends \ - python3 python3-pip ca-certificates curl \ - && rm -rf /var/lib/apt/lists/* - -# Install static server "serve" globally -RUN npm install -g serve@14.2.0 - -# Copy built frontends from builder -COPY --from=builder /build/frontend/packages/web/dist /app/web -COPY --from=builder /build/frontend/packages/admin/dist /app/admin - -# Copy server build and node_modules from builder -COPY --from=builder /build/server/dist /app/server/dist -COPY --from=builder /build/server/node_modules /app/server/node_modules -COPY --from=builder /build/server/package.json /app/server/package.json - -# Copy bot sources -COPY tgbot /app/tgbot - -# Install python dependencies for bot -RUN pip3 install --no-cache-dir pytelegrambotapi requests python-dotenv - -# Copy entrypoint script -COPY docker-entrypoint.sh /app/docker-entrypoint.sh -RUN chmod +x /app/docker-entrypoint.sh - -# Expose ports: web (8888), admin (9999), server (3000) -EXPOSE 8888 9999 3000 - -HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ - CMD curl -f http://localhost:3000/graphql || exit 1 - -ENTRYPOINT ["/app/docker-entrypoint.sh"] diff --git a/Dockerfile.bot b/Dockerfile.bot deleted file mode 100644 index e9f295a..0000000 --- a/Dockerfile.bot +++ /dev/null @@ -1,10 +0,0 @@ -FROM python:3.11-slim -WORKDIR /app/tgbot - -RUN pip3 install --no-cache-dir pytelegrambotapi requests python-dotenv || true - -COPY tgbot ./ - -ENV PYTHONUNBUFFERED=1 - -CMD ["python3", "uni_eduplatform_bot.py"] diff --git a/Dockerfile.frontend b/Dockerfile.frontend deleted file mode 100644 index 02c3679..0000000 --- a/Dockerfile.frontend +++ /dev/null @@ -1,29 +0,0 @@ -ARG APP=web -FROM node:20-bullseye AS builder -WORKDIR /build - -RUN corepack enable && corepack prepare pnpm@latest --activate - -COPY frontend ./frontend -WORKDIR /build/frontend -# Create pnpm workspace file so pnpm recognizes workspaces in the frontend monorepo -RUN printf "packages:\n - 'packages/*'\n" > pnpm-workspace.yaml -# Run pnpm in CI mode inside the container to avoid TTY removal errors -ENV CI=true -# Allow installing even if lockfile is out of date inside the container. In CI you may want to keep frozen-lockfile=true -# but building directly from the repo may require updating lockfile here. -RUN pnpm install --no-frozen-lockfile --network-concurrency 1 --link-workspace-packages=true - -# Build only the requested app (web or admin) -ARG APP -RUN pnpm --filter ${APP} build - -FROM nginx:stable-alpine -ARG APP -COPY --from=builder /build/frontend/packages/${APP}/dist /usr/share/nginx/html - -# Default nginx conf (serve static) -COPY nginx/${APP}.conf /etc/nginx/conf.d/default.conf - -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] diff --git a/Dockerfile.server b/Dockerfile.server deleted file mode 100644 index a8e9583..0000000 --- a/Dockerfile.server +++ /dev/null @@ -1,32 +0,0 @@ -### Builder stage: install deps and build server -FROM node:18-bullseye AS builder -WORKDIR /build/server - -# Install dependencies (including dev deps so prisma CLI is available) -COPY server/package.json server/package-lock.json* ./ -RUN npm ci --no-audit --no-fund || npm install - -COPY server ./ -# generate prisma client from schema so types (models) are available during build -RUN npx prisma generate - -RUN npm run build - -### Final runtime image -FROM node:18-bullseye-slim -WORKDIR /app/server - -# copy built app and node_modules from builder -COPY --from=builder /build/server/dist ./dist -COPY --from=builder /build/server/node_modules ./node_modules -COPY --from=builder /build/server/package.json ./package.json - -# copy prisma schema and migrations so `prisma migrate deploy` can find them -COPY --from=builder /build/server/prisma ./prisma - -# entrypoint to run migrations then start server -COPY docker-entrypoint-server.sh /app/server/docker-entrypoint-server.sh -RUN chmod +x /app/server/docker-entrypoint-server.sh - -EXPOSE 3000 -CMD ["/app/server/docker-entrypoint-server.sh"] diff --git a/docker-entrypoint-server.sh b/docker-entrypoint-server.sh deleted file mode 100644 index 58e4d1e..0000000 --- a/docker-entrypoint-server.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -echo "Running prisma migrations (deploy) if DATABASE_URL is set..." -if [ -n "${DATABASE_URL:-}" ]; then - # run migrations (requires prisma available in node_modules from builder) - echo "DATABASE_URL present, running: npx prisma migrate deploy" - npx prisma migrate deploy || echo "prisma migrate deploy exit code $?"; -else - echo "DATABASE_URL not set, skipping migrations" -fi - -echo "Starting server..." -node dist/main.js diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh deleted file mode 100644 index ab15d4c..0000000 --- a/docker-entrypoint.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Start server, static frontends and telegram bot in background and wait. -# This is a simple supervisor; for production consider using a proper process manager. - -echo "Starting services..." - -# Start Node server -if [ -f /app/server/dist/main.js ]; then - echo "Starting Node server (server)..." - node /app/server/dist/main.js & - PID_SERVER=$! -else - echo "Warning: server dist not found at /app/server/dist/main.js" - PID_SERVER=0 -fi - -# Start web frontend (serve) -if [ -d /app/web ]; then - echo "Starting web frontend on :8888" - serve -s /app/web -l 8888 & - PID_WEB=$! -else - echo "Warning: web build not found at /app/web" - PID_WEB=0 -fi - -# Start admin frontend (serve) -if [ -d /app/admin ]; then - echo "Starting admin frontend on :9999" - serve -s /app/admin -l 9999 & - PID_ADMIN=$! -else - echo "Warning: admin build not found at /app/admin" - PID_ADMIN=0 -fi - -# Start Telegram bot -if [ -f /app/tgbot/uni_eduplatform_bot.py ]; then - echo "Starting Telegram bot" - python3 /app/tgbot/uni_eduplatform_bot.py & - PID_BOT=$! -else - echo "Warning: bot script not found at /app/tgbot/uni_eduplatform_bot.py" - PID_BOT=0 -fi - -shutdown() { - echo "Shutting down..." - set +e - if [ "$PID_BOT" != "0" ]; then kill -TERM "$PID_BOT" 2>/dev/null || true; fi - if [ "$PID_ADMIN" != "0" ]; then kill -TERM "$PID_ADMIN" 2>/dev/null || true; fi - if [ "$PID_WEB" != "0" ]; then kill -TERM "$PID_WEB" 2>/dev/null || true; fi - if [ "$PID_SERVER" != "0" ]; then kill -TERM "$PID_SERVER" 2>/dev/null || true; fi - wait - exit 0 -} - -trap shutdown SIGINT SIGTERM - -echo "All services started. Waiting..." - -# Wait indefinitely while background processes run -while true; do - # If any background process died, exit with non-zero to allow container restart - if [ "$PID_SERVER" != "0" ] && ! kill -0 "$PID_SERVER" 2>/dev/null; then echo "Server exited"; exit 1; fi - if [ "$PID_WEB" != "0" ] && ! kill -0 "$PID_WEB" 2>/dev/null; then echo "Web server exited"; exit 1; fi - if [ "$PID_ADMIN" != "0" ] && ! kill -0 "$PID_ADMIN" 2>/dev/null; then echo "Admin server exited"; exit 1; fi - if [ "$PID_BOT" != "0" ] && ! kill -0 "$PID_BOT" 2>/dev/null; then echo "Bot exited"; exit 1; fi - sleep 5 -done From 94c99d4c23a4721d5092c9b22fe9b3e69d8596c5 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 27 Mar 2026 16:16:13 +0300 Subject: [PATCH 09/23] docker-compose has been updated to reflect current data --- docker-compose.yml | 65 +++++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 06ff7f9..6403708 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,35 +3,48 @@ version: "3.8" services: db: image: postgres:15-alpine - environment: - POSTGRES_DB: ${POSTGRES_DB:-quiz} - POSTGRES_USER: ${POSTGRES_USER:-quiz} - POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-quiz} + container_name: edu_postgres + env_file: + - .env volumes: - - db-data:/var/lib/postgresql/data + - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" networks: - quiznet healthcheck: - test: - [ - "CMD-SHELL", - "pg_isready -U ${POSTGRES_USER:-quiz} -d ${POSTGRES_DB:-quiz}", - ] + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-quizuser} -d ${POSTGRES_DB:-quiz}"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped + pgbackups: + image: prodrigestivill/postgres-backup-local + container_name: edu_pgbackups + restart: unless-stopped + env_file: + - .env + environment: + POSTGRES_HOST: db + SCHEDULE: "@daily" + BACKUP_KEEP_DAYS: 7 + BACKUP_KEEP_WEEKS: 3 + BACKUP_KEEP_MONTHS: 6 + networks: + - quiznet + volumes: + - ./backups:/backups + depends_on: + db: + condition: service_healthy + server: build: - context: . - dockerfile: Dockerfile.server + context: ./server + container_name: edu_server env_file: - .env - environment: - - NODE_ENV=production ports: - "3000:3000" networks: @@ -39,14 +52,15 @@ services: depends_on: db: condition: service_healthy + command: > + sh -c "npx prisma migrate deploy && node dist/main.js" restart: unless-stopped web: build: - context: . - dockerfile: Dockerfile.frontend - args: - APP: web + context: ./frontend + dockerfile: packages/web/Dockerfile + container_name: edu_web ports: - "8888:80" networks: @@ -57,10 +71,9 @@ services: admin: build: - context: . - dockerfile: Dockerfile.frontend - args: - APP: admin + context: ./frontend + dockerfile: packages/admin/Dockerfile + container_name: edu_admin ports: - "9999:80" networks: @@ -71,12 +84,10 @@ services: bot: build: - context: . - dockerfile: Dockerfile.bot + context: ./tgbot + container_name: edu_tgbot env_file: - .env - environment: - - PLATFORM_ADDRESS=http://web:80 networks: - quiznet depends_on: @@ -88,4 +99,4 @@ networks: driver: bridge volumes: - db-data: + postgres_data: \ No newline at end of file From 76c27724060d9b9b416bacb950a313640af1f705 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 27 Mar 2026 19:57:56 +0300 Subject: [PATCH 10/23] Updated ports for admin and web --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6403708..858e988 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,7 +62,7 @@ services: dockerfile: packages/web/Dockerfile container_name: edu_web ports: - - "8888:80" + - "8080:80" networks: - quiznet depends_on: @@ -75,7 +75,7 @@ services: dockerfile: packages/admin/Dockerfile container_name: edu_admin ports: - - "9999:80" + - "8081:80" networks: - quiznet depends_on: From e407e34041c4fbc6217da4a19a1268c68c7a4250 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Fri, 27 Mar 2026 22:47:18 +0300 Subject: [PATCH 11/23] The list of variables in .env.example has been updated --- .env.example | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index d392240..3b35e1d 100644 --- a/.env.example +++ b/.env.example @@ -11,9 +11,8 @@ JWT_REFRESH_SECRET=change_me_refresh # Telegram bot TG_BOT_TOKEN=123456:ABC-DEF TEACHER_CODE=SECRET - -# Platform address used by bot to create links (inside docker-compose use web service) -PLATFORM_ADDRESS=http://web:80 +PLATFORM_ADDRESS_SERVER=http://server:3000 +PLATFORM_ADDRESS_CLIENT=http://localhost:8080 # CORS CORS_ORIGIN=* From 75b2b66a966b866cf2697a2294d27440d4506092 Mon Sep 17 00:00:00 2001 From: Willow <92713981+WillowRussia@users.noreply.github.com> Date: Fri, 27 Mar 2026 23:17:11 +0300 Subject: [PATCH 12/23] Rename DockerFile to Dockerfile --- tgbot/{DockerFile => Dockerfile} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename tgbot/{DockerFile => Dockerfile} (75%) diff --git a/tgbot/DockerFile b/tgbot/Dockerfile similarity index 75% rename from tgbot/DockerFile rename to tgbot/Dockerfile index 81a9e55..d927174 100644 --- a/tgbot/DockerFile +++ b/tgbot/Dockerfile @@ -6,4 +6,4 @@ COPY uni_eduplatform_bot.py . RUN pip install pyTelegramBotAPI requests python-dotenv -CMD ["python", "uni_eduplatform_bot.py"] \ No newline at end of file +CMD ["python", "uni_eduplatform_bot.py"] From 3c4626d55e78eb277ed895706619ebbb0e13a249 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Sat, 28 Mar 2026 11:28:54 +0300 Subject: [PATCH 13/23] The deployment method to a virtual machine has been updated --- .github/workflows/practika.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index bc23619..7e80384 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -90,10 +90,20 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - deploy-to-vm: + deploy-to-new-vm: needs: build-tgbot runs-on: ubuntu-latest steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Copy compose via ssh + uses: appleboy/scp-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + password: ${{ secrets.SSH_PASSPHRASE }} + source: "docker-compose.yml" + target: "eduplatform/" - name: Deploy via SSH uses: appleboy/ssh-action@master with: @@ -101,13 +111,12 @@ jobs: username: ${{ secrets.USER }} password: ${{ secrets.SSH_PASSPHRASE }} script: | + cd ~/eduplatform + docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-server:latest - docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-web:latest - docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-admin:latest - docker pull ${{ secrets.DOCKER_USERNAME }}/eduplatform-tgbot:latest + docker compose pull docker compose up -d --remove-orphans - docker image prune -f \ No newline at end of file + docker system prune -af \ No newline at end of file From 558c04bd246aaf3d1ef4a3cfe7601006f10b19e2 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Sat, 28 Mar 2026 11:30:03 +0300 Subject: [PATCH 14/23] Old pipelines have been removed --- .github/workflows/DEV.yml | 170 ------------------------------------- .github/workflows/main.yml | 28 ------ 2 files changed, 198 deletions(-) delete mode 100644 .github/workflows/DEV.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/DEV.yml b/.github/workflows/DEV.yml deleted file mode 100644 index a39feb5..0000000 --- a/.github/workflows/DEV.yml +++ /dev/null @@ -1,170 +0,0 @@ -name: DEV workflow - -on: - push: - branches: - - DEV -jobs: - build_and_push_front_to_docker_hub: - name: Push Docker frontend image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - ref: "DEV" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.2.0 - - name: Login to Docker - uses: docker/login-action@v3.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to DockerHub - uses: docker/build-push-action@v5.3.0 - with: - context: ./ - file: client/Dockerfile - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/frontend:DEV - - build_and_push_users_to_docker_hub: - name: Push Docker Users image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - ref: "DEV" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.2.0 - - name: Login to Docker - uses: docker/login-action@v3.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to DockerHub - uses: docker/build-push-action@v5.3.0 - with: - context: ./users - file: users/Dockerfile - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/backend-users:DEV - - build_and_push_tests_to_docker_hub: - name: Push Docker tests image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - ref: "DEV" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.2.0 - - name: Login to Docker - uses: docker/login-action@v3.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to DockerHub - uses: docker/build-push-action@v5.3.0 - with: - context: ./tests - file: tests/Dockerfile - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/backend-tests:DEV - - build_and_push_subjects_to_docker_hub: - name: Push Docker subjects image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - ref: "DEV" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.2.0 - - name: Login to Docker - uses: docker/login-action@v3.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to DockerHub - uses: docker/build-push-action@v5.3.0 - with: - context: ./subjects - file: subjects/docker/dev/Dockerfile - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/backend-subjects:DEV - - build_and_push_analytics_to_docker_hub: - name: Push Docker analytics image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - ref: "DEV" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.2.0 - - name: Login to Docker - uses: docker/login-action@v3.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to DockerHub - uses: docker/build-push-action@v5.3.0 - with: - context: ./analytics - file: analytics/Dockerfile - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/backend-analytics:DEV - - deploy: - name: Деплой на сервер - runs-on: ubuntu-latest - needs: - - build_and_push_subjects_to_docker_hub - - build_and_push_users_to_docker_hub - - build_and_push_tests_to_docker_hub - - build_and_push_analytics_to_docker_hub - - build_and_push_front_to_docker_hub - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Executing remote ssh commands to stop docker, clean up - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USER }} - password: ${{ secrets.SSH_PASSPHRASE }} - script: | - docker compose -f DEV/compose/docker-compose-DH-DEV.yml down || true - docker volume rm compose-dev_static || true - cp -r DEV/compose/env ./env || true - rm -rf DEV || true - mkdir -p DEV/compose - mv ./env DEV/compose || true - - name: Copy compose via ssh - uses: appleboy/scp-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USER }} - password: ${{ secrets.SSH_PASSPHRASE }} - source: "compose" - target: "DEV" - - name: Executing remote ssh commands to deploy - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USER }} - password: ${{ secrets.SSH_PASSPHRASE }} - script: | - mkdir DEV/dbs - touch DEV/dbs/users_db.sqlite3 - touch DEV/dbs/tests_db.sqlite3 - touch DEV/dbs/subjects_db.sqlite3 - touch DEV/dbs/analytics_db.sqlite3 - docker compose -f DEV/compose/docker-compose-DH-DEV.yml pull - docker compose -f DEV/compose/docker-compose-DH-DEV.yml up --build -d - docker system prune -af diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 691bfbf..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,28 +0,0 @@ - -name: MAIN workflow - -on: - push: - branches: - - main -jobs: - build_and_push_front_to_docker_hub: - name: Push Docker frontend image to DockerHub - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3.2.0 - - name: Login to Docker - uses: docker/login-action@v3.1.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Push to DockerHub - uses: docker/build-push-action@v5.3.0 - with: - context: ./ - file: client/Dockerfile - push: true - tags: ${{ secrets.DOCKER_USERNAME }}/frontend:PROD \ No newline at end of file From 88dd19555659000d1612c44d411148296fe30c53 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Sat, 28 Mar 2026 14:59:25 +0300 Subject: [PATCH 15/23] Returned the old ports for admin and web --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 858e988..6403708 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,7 +62,7 @@ services: dockerfile: packages/web/Dockerfile container_name: edu_web ports: - - "8080:80" + - "8888:80" networks: - quiznet depends_on: @@ -75,7 +75,7 @@ services: dockerfile: packages/admin/Dockerfile container_name: edu_admin ports: - - "8081:80" + - "9999:80" networks: - quiznet depends_on: From ded7ef7c50105a81a6cabe7700ed81225025e427 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Sat, 28 Mar 2026 15:52:43 +0300 Subject: [PATCH 16/23] Added debug logs for web container --- .github/workflows/practika.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index 7e80384..a15cab2 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -118,5 +118,14 @@ jobs: docker compose pull docker compose up -d --remove-orphans - + + # === ВРЕМЕННЫЕ ЛОГИ ДЛЯ ДЕБАГА === + echo "--- LOGS FOR WEB CONTAINER ---" + docker compose logs --tail=50 web + echo "--- LOGS FOR ADMIN CONTAINER ---" + docker compose logs --tail=50 admin + echo "--- LOGS FOR SERVER CONTAINER ---" + docker compose logs --tail=50 server + # ===================================== + docker system prune -af \ No newline at end of file From 30633e755048e14113c0a7f213d4eee4db29cab0 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Sat, 28 Mar 2026 16:27:47 +0300 Subject: [PATCH 17/23] Export docker username for compose --- .github/workflows/practika.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index a15cab2..9b4d2e3 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -115,6 +115,8 @@ jobs: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} + export DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} + docker compose pull docker compose up -d --remove-orphans From 3a002713b51a7405a36a3191b427db854f4b10a4 Mon Sep 17 00:00:00 2001 From: WillowRussia Date: Sat, 28 Mar 2026 16:47:52 +0300 Subject: [PATCH 18/23] Removed build context for prod deployment --- docker-compose.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6403708..cf34693 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,8 +40,7 @@ services: condition: service_healthy server: - build: - context: ./server + image: ${DOCKER_USERNAME}/eduplatform-server:latest container_name: edu_server env_file: - .env @@ -57,9 +56,7 @@ services: restart: unless-stopped web: - build: - context: ./frontend - dockerfile: packages/web/Dockerfile + image: ${DOCKER_USERNAME}/eduplatform-web:latest container_name: edu_web ports: - "8888:80" @@ -70,9 +67,7 @@ services: restart: unless-stopped admin: - build: - context: ./frontend - dockerfile: packages/admin/Dockerfile + image: ${DOCKER_USERNAME}/eduplatform-admin:latest container_name: edu_admin ports: - "9999:80" @@ -83,8 +78,7 @@ services: restart: unless-stopped bot: - build: - context: ./tgbot + image: ${DOCKER_USERNAME}/eduplatform-tgbot:latest container_name: edu_tgbot env_file: - .env From 432c1ccbe034a5224c374d7b0c486fdb55c4434a Mon Sep 17 00:00:00 2001 From: 0rtemk Date: Sun, 29 Mar 2026 00:55:50 +0300 Subject: [PATCH 19/23] hotfix --- .github/workflows/practika.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index 9b4d2e3..089ef89 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -114,12 +114,14 @@ jobs: cd ~/eduplatform docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} - + export DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }} - + + docker compose down || true + docker compose pull - - docker compose up -d --remove-orphans + + docker compose up -d --build --remove-orphans # === ВРЕМЕННЫЕ ЛОГИ ДЛЯ ДЕБАГА === echo "--- LOGS FOR WEB CONTAINER ---" @@ -130,4 +132,4 @@ jobs: docker compose logs --tail=50 server # ===================================== - docker system prune -af \ No newline at end of file + docker system prune -af From f5d6b59649d2cae4a46955a10c22cd89929d39c7 Mon Sep 17 00:00:00 2001 From: 0rtemk Date: Sun, 29 Mar 2026 01:46:01 +0300 Subject: [PATCH 20/23] hotfix(front): server location --- frontend/packages/ui/src/hooks/useApollo.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/packages/ui/src/hooks/useApollo.ts b/frontend/packages/ui/src/hooks/useApollo.ts index 1c7e2f8..01115d3 100644 --- a/frontend/packages/ui/src/hooks/useApollo.ts +++ b/frontend/packages/ui/src/hooks/useApollo.ts @@ -6,13 +6,16 @@ import { onError } from '@apollo/client/link/error'; // Single-flight refresh promise to avoid concurrent refresh requests let refreshPromise: Promise | null = null; +const { protocol, hostname } = window.location; +const graphqlUrl = `http://${hostname}:3000/graphql`; + export const refreshAccessTokenViaCookie = async (): Promise => { if (refreshPromise) return refreshPromise; refreshPromise = (async () => { try { - const clientId = import.meta.env.VITE_CLIENT_ID || 'web'; - const res = await fetch(import.meta.env.VITE_GRAPHQL_URL || 'http://localhost:3000/graphql', { + const clientId = 'web'; + const res = await fetch(graphqlUrl, { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json', 'x-client-id': clientId }, @@ -34,13 +37,13 @@ export const refreshAccessTokenViaCookie = async (): Promise => { }; const httpLink = createHttpLink({ - uri: import.meta.env.VITE_GRAPHQL_URL || 'http://localhost:3000/graphql', + uri: graphqlUrl, credentials: 'include', // send cookies (refresh token) with requests }); const authLink = setContext((_, { headers }) => { const token = getAccessToken(); - const clientId = import.meta.env.VITE_CLIENT_ID || 'web'; + const clientId = 'web'; return { headers: { ...headers, From 9fad56335dd1811f49ba8c9301ddc4853bc494cd Mon Sep 17 00:00:00 2001 From: 0rtemk Date: Sun, 29 Mar 2026 03:22:38 +0300 Subject: [PATCH 21/23] hotfix(tgbot): add proxy for api connection --- tgbot/Dockerfile | 2 +- tgbot/uni_eduplatform_bot.py | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/tgbot/Dockerfile b/tgbot/Dockerfile index d927174..b4766c0 100644 --- a/tgbot/Dockerfile +++ b/tgbot/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /app COPY uni_eduplatform_bot.py . -RUN pip install pyTelegramBotAPI requests python-dotenv +RUN pip install pyTelegramBotAPI requests python-dotenv PySocks CMD ["python", "uni_eduplatform_bot.py"] diff --git a/tgbot/uni_eduplatform_bot.py b/tgbot/uni_eduplatform_bot.py index 0bd197d..0cea177 100644 --- a/tgbot/uni_eduplatform_bot.py +++ b/tgbot/uni_eduplatform_bot.py @@ -4,12 +4,28 @@ from typing import Dict, Any import telebot +import telebot.apihelper as apihelper from telebot import types from dotenv import load_dotenv # Load .env load_dotenv() +SOCKS5_PROXY = os.getenv('SOCKS5_PROXY') + +proxies = None +if SOCKS5_PROXY: + proxies = { + 'http': SOCKS5_PROXY, + 'https': SOCKS5_PROXY, + } + +if SOCKS5_PROXY: + apihelper.proxy = { + 'http': SOCKS5_PROXY, + 'https': SOCKS5_PROXY, + } + TOKEN = os.getenv('TG_BOT_TOKEN') TEACHER_CODE = os.getenv('TEACHER_CODE') PLATFORM_ADDRESS_SERVER = os.getenv('PLATFORM_ADDRESS_SERVER') @@ -115,7 +131,7 @@ def graphql_query(query: str, variables: dict = None) -> dict: if variables is not None: payload['variables'] = variables try: - r = requests.post(url, json=payload, headers=headers, timeout=10) + r = requests.post(url, json=payload, headers=headers, timeout=10, proxies=proxies) try: r.raise_for_status() except requests.HTTPError as http_err: From 2d95330fef32e821636ec6e324b2af9e1b09982e Mon Sep 17 00:00:00 2001 From: 0rtemk Date: Sun, 29 Mar 2026 16:11:14 +0300 Subject: [PATCH 22/23] hotfix --- .github/workflows/practika.yml | 11 +---------- tgbot/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/practika.yml b/.github/workflows/practika.yml index 089ef89..2a6be8e 100644 --- a/.github/workflows/practika.yml +++ b/.github/workflows/practika.yml @@ -121,15 +121,6 @@ jobs: docker compose pull - docker compose up -d --build --remove-orphans - - # === ВРЕМЕННЫЕ ЛОГИ ДЛЯ ДЕБАГА === - echo "--- LOGS FOR WEB CONTAINER ---" - docker compose logs --tail=50 web - echo "--- LOGS FOR ADMIN CONTAINER ---" - docker compose logs --tail=50 admin - echo "--- LOGS FOR SERVER CONTAINER ---" - docker compose logs --tail=50 server - # ===================================== + docker compose up -d --remove-orphans docker system prune -af diff --git a/tgbot/Dockerfile b/tgbot/Dockerfile index b4766c0..565f40c 100644 --- a/tgbot/Dockerfile +++ b/tgbot/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /app COPY uni_eduplatform_bot.py . -RUN pip install pyTelegramBotAPI requests python-dotenv PySocks +RUN pip install pyTelegramBotAPI requests[socks] python-dotenv PySocks CMD ["python", "uni_eduplatform_bot.py"] From a47572b373fd09daa27430e2e1eb053972ae878e Mon Sep 17 00:00:00 2001 From: 0rtemk Date: Sun, 29 Mar 2026 16:36:01 +0300 Subject: [PATCH 23/23] hotfix --- tgbot/uni_eduplatform_bot.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tgbot/uni_eduplatform_bot.py b/tgbot/uni_eduplatform_bot.py index 0cea177..8993969 100644 --- a/tgbot/uni_eduplatform_bot.py +++ b/tgbot/uni_eduplatform_bot.py @@ -14,11 +14,11 @@ SOCKS5_PROXY = os.getenv('SOCKS5_PROXY') proxies = None -if SOCKS5_PROXY: - proxies = { - 'http': SOCKS5_PROXY, - 'https': SOCKS5_PROXY, - } +# if SOCKS5_PROXY: +# proxies = { +# 'http': SOCKS5_PROXY, +# 'https': SOCKS5_PROXY, +# } if SOCKS5_PROXY: apihelper.proxy = {