Skip to content

Commit

Permalink
build: cleanup worker
Browse files Browse the repository at this point in the history
  • Loading branch information
okradze committed Nov 2, 2023
1 parent b8e2738 commit ce48c61
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 520 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/deploy_worker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy worker
name: Deploy Worker

on:
push:
Expand All @@ -13,28 +13,6 @@ env:
TR_DIRECTORY: "apps/server/terraform"

jobs:
# Build_beat:
# name: Build Application Container
# timeout-minutes: 15
# runs-on: ubuntu-latest
# outputs:
# tag_name: ${{ steps.build-image.outputs.TAG_NAME }}
# environment: dev
# steps:
# - name: Checkout
# uses: actions/checkout@v3

# - name: 'Build and push image'
# uses: azure/docker-login@v1
# with:
# login-server: ${{ vars.ACR_REGISTRY }}
# username: ${{ secrets.AZURE_USERNAME }}
# password: ${{ secrets.AZURE_PASSWORD }}
# - run: |
# docker build -t ${{ vars.ACR_REGISTRY }}/${{ env.ACR_REPOSITORY_BEAT }}:latest -f apps/worker/docker/Dockerfile.beat apps/worker
# docker push ${{ vars.ACR_REGISTRY }}/${{ env.ACR_REPOSITORY_BEAT }}:latest
# echo "TAG_NAME=${{ github.sha }}" >> $GITHUB_ENV

Build_worker:
name: Build Application Container
timeout-minutes: 15
Expand Down
2 changes: 1 addition & 1 deletion apps/server/services/schedule.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime, timedelta

# import arrow
import arrow
from fastapi_sqlalchemy import db

from models.chat import ChatModel
Expand Down
7 changes: 6 additions & 1 deletion apps/worker/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Worker for jobs

## Running

```bash
cd apps/worker
docker-compose up
docker build -t worker -f docker/Dockerfile .
docker run -p 3001:80 -t worker
```
18 changes: 0 additions & 18 deletions apps/worker/docker-compose.yml

This file was deleted.

6 changes: 3 additions & 3 deletions apps/worker/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app

# Change permissions of the work directory
RUN chmod 777 /app

# Install dependencies
COPY pyproject.toml poetry.lock /app/

Expand All @@ -26,6 +23,9 @@ RUN apt-get update && apt-get install -y supervisor
# Copy project
COPY ./ /app/

# Change permissions of the work directory
RUN chmod 777 /app

# Copy supervisor configuration
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

Expand Down
38 changes: 0 additions & 38 deletions apps/worker/docker/Dockerfile.beat

This file was deleted.

38 changes: 0 additions & 38 deletions apps/worker/docker/Dockerfile.worker

This file was deleted.

13 changes: 0 additions & 13 deletions apps/worker/health_check.py

This file was deleted.

353 changes: 1 addition & 352 deletions apps/worker/poetry.lock

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions apps/worker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
celery = "^5.3.4"
requests = "^2.31.0"
python-dotenv = "^1.0.0"
redis = "^5.0.1"
httpx = "^0.25.0"
flower = "^2.0.1"
fastapi = "^0.104.1"
uvicorn = "^0.23.2"


[build-system]
Expand Down
15 changes: 0 additions & 15 deletions apps/worker/supervisord_beat.conf

This file was deleted.

15 changes: 0 additions & 15 deletions apps/worker/supervisord_worker.conf

This file was deleted.

0 comments on commit ce48c61

Please sign in to comment.