Skip to content

Commit

Permalink
feat: beat worker for configuration (makeplane#1571)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohashescobar authored Jul 19, 2023
1 parent d759438 commit 2f3970f
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apiserver/Dockerfile.api
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions apiserver/bin/beat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

python manage.py wait_for_db
celery -A plane beat -l info
15 changes: 15 additions & 0 deletions docker-compose-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f3970f

Please sign in to comment.