Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
89c7682
Duplicate code remove
WillowRussia Feb 13, 2026
073b1ea
The debug code has been remove
WillowRussia Feb 13, 2026
a8cf311
Add binaryTargets
WillowRussia Feb 13, 2026
195046b
Merge remote-tracking branch 'origin/develop' into practika-develop
WillowRussia Mar 24, 2026
89b8b43
Added memory limit for admin and web
WillowRussia Mar 24, 2026
9fe70b6
Added caching and deployment to a virtual machine
WillowRussia Mar 25, 2026
46775fb
Added telegram bot build and deploy
WillowRussia Mar 27, 2026
16467cb
Removed code that was added by mistake and moved to the correct file
WillowRussia Mar 27, 2026
59d4d98
Old versions of files have been removed
WillowRussia Mar 27, 2026
94c99d4
docker-compose has been updated to reflect current data
WillowRussia Mar 27, 2026
76c2772
Updated ports for admin and web
WillowRussia Mar 27, 2026
e407e34
The list of variables in .env.example has been updated
WillowRussia Mar 27, 2026
75b2b66
Rename DockerFile to Dockerfile
WillowRussia Mar 27, 2026
3c4626d
The deployment method to a virtual machine has been updated
WillowRussia Mar 28, 2026
558c04b
Old pipelines have been removed
WillowRussia Mar 28, 2026
88dd195
Returned the old ports for admin and web
WillowRussia Mar 28, 2026
ded7ef7
Added debug logs for web container
WillowRussia Mar 28, 2026
30633e7
Export docker username for compose
WillowRussia Mar 28, 2026
3a00271
Removed build context for prod deployment
WillowRussia Mar 28, 2026
432c1cc
hotfix
Mar 28, 2026
f5d6b59
hotfix(front): server location
Mar 28, 2026
9fad563
hotfix(tgbot): add proxy for api connection
Mar 29, 2026
2d95330
hotfix
Mar 29, 2026
a47572b
hotfix
Mar 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=*
Expand Down
170 changes: 0 additions & 170 deletions .github/workflows/DEV.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/main.yml

This file was deleted.

101 changes: 81 additions & 20 deletions .github/workflows/practika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,125 @@ 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
tags: ${{ secrets.DOCKER_USERNAME }}/eduplatform-admin:latest
cache-from: type=gha
cache-to: type=gha,mode=max

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-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:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
password: ${{ secrets.SSH_PASSPHRASE }}
script: |
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 system prune -af
Loading
Loading