feat: beat worker for configuration (#1571)

This commit is contained in:
Nikhil 2023-07-19 15:25:33 +05:30 committed by GitHub
parent d759438ebd
commit 2f3970f641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 1 deletions

View File

@ -49,7 +49,7 @@ USER root
RUN apk --no-cache add "bash~=5.2"
COPY ./bin ./bin/
RUN chmod +x ./bin/takeoff ./bin/worker
RUN chmod +x ./bin/takeoff ./bin/worker ./bin/beat
RUN chmod -R 777 /code
USER captain

5
apiserver/bin/beat Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e
python manage.py wait_for_db
celery -A plane beat -l info

View File

@ -82,6 +82,21 @@ services:
- plane-db
- plane-redis
plane-beat-worker:
container_name: planebeatworker
image: makeplane/plane-worker:latest
restart: always
command: ./bin/beat
env_file:
- .env
environment:
<<: *api-and-worker-env
depends_on:
- plane-api
- plane-db
- plane-redis
plane-db:
container_name: plane-db
image: postgres:15.2-alpine

View File

@ -90,6 +90,22 @@ services:
- plane-db
- plane-redis
plane-beat-worker:
container_name: planebeatworker
build:
context: ./apiserver
dockerfile: Dockerfile.api
restart: always
command: ./bin/beat
env_file:
- .env
environment:
<<: *api-and-worker-env
depends_on:
- plane-api
- plane-db
- plane-redis
plane-db:
container_name: plane-db
image: postgres:15.2-alpine