File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- static /
1+
Original file line number Diff line number Diff line change 4040 image_tag : ${{ env.TAG }}
4141 github_token : ${{ secrets.GITHUB_TOKEN }}
4242 # optionally push to the Docker Hub (docker.io)
43- # docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security
43+ # docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security
44+
45+ # https://github.com/marketplace/actions/push-to-ghcr
46+ - name : Build and publish a Docker image for ${{ github.repository }}
47+ uses : macbre/push-to-ghcr@master
48+ with :
49+ dockerfile : Dockerfile.celery
50+ image_name : ${REPO_LC}-celery-backend
51+ image_tag : ${{ env.TAG }}
52+ github_token : ${{ secrets.GITHUB_TOKEN }}
53+ # optionally push to the Docker Hub (docker.io)
54+ # docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security
Original file line number Diff line number Diff line change @@ -176,6 +176,6 @@ cython_debug/
176176
177177
178178# # project specific
179-
180179postgres_data /
181180config.json
181+ jwt.hex
Original file line number Diff line number Diff line change @@ -15,3 +15,5 @@ COPY urNode-backend/requirements /app/requirements
1515RUN pip install --no-cache-dir --compile -r requirements/run-requirements.txt
1616
1717COPY urNode-backend/ /app
18+
19+ ENTRYPOINT [ "sh", "entrypoint_celery.sh" ]
Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ services:
1111
1212 # Redis - result backend
1313 redis :
14- image : redis:2.8.19
14+ container_name : redis_app_urnode
15+ image : redis:alpine
1516 hostname : redis
1617
1718 backend :
@@ -40,9 +41,10 @@ services:
4041 context : ./
4142 dockerfile : ./Dockerfile.celery
4243 container_name : celery_server
43- command : celery -A Uturn worker --loglevel=info --without-gossip --without-mingle --without-heartbeat -Ofair --pool=solo
4444 volumes :
45- - " ./backend:/opt/uturn/backend"
45+ - " ./urNode-backend:/app"
46+ env_file :
47+ - ./.env
4648 depends_on :
4749 - redis
4850 - postgres
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ cd ur_node/
3+
4+ exec celery -A ur_node worker --loglevel=info --without-gossip --without-mingle --without-heartbeat -Ofair --pool=solo
Original file line number Diff line number Diff line change 1+ import os
2+
3+ from celery import Celery
4+ from django .conf import settings
5+
6+ os .environ .setdefault ("DJANGO_SETTINGS_MODULE" , "ur_node.settings" )
7+ app = Celery ("ur_node" )
8+
9+ app .config_from_object ("django.conf:settings" )
10+ app .autodiscover_tasks (lambda : settings .INSTALLED_APPS )
You can’t perform that action at this time.
0 commit comments