offloaded some apps.lyric.views responsibilities to new Celery depend fn in .tasks; core.celery created for celery config; CELERY_BROKER_URL added to .settings & throughout project; some lyric view IT responsibility now accordingly covered by task UT domain
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -114,6 +114,15 @@
|
||||
POSTGRES_USER: gamearray
|
||||
POSTGRES_PASSWORD: "{{ postgres_password }}"
|
||||
|
||||
- name: Start Redis container
|
||||
community.docker.docker_container:
|
||||
name: gamearray_redis
|
||||
image: redis:7
|
||||
state: started
|
||||
restart_policy: unless-stopped
|
||||
networks:
|
||||
- name: gamearray_net
|
||||
|
||||
- name: Run container
|
||||
community.docker.docker_container:
|
||||
name: gamearray
|
||||
@@ -126,11 +135,30 @@
|
||||
DJANGO_ALLOWED_HOST: "{{ django_allowed_host }}"
|
||||
DATABASE_URL: "postgresql://gamearray:{{ postgres_password }}@gamearray_postgres/gamearray"
|
||||
MAILGUN_API_KEY: "{{ mailgun_api_key }}"
|
||||
CELERY_BROKER_URL: "redis://gamearray_redis:6379/0"
|
||||
networks:
|
||||
- name: gamearray_net
|
||||
ports:
|
||||
127.0.0.1:8888:8888
|
||||
|
||||
- name: Start Celery worker container
|
||||
community.docker.docker_container:
|
||||
name: gamearray_celery
|
||||
image: gitea.earthmanrpg.me/discoman/gamearray:latest
|
||||
state: started
|
||||
recreate: true
|
||||
env:
|
||||
DJANGO_DEBUG_FALSE: "1"
|
||||
DJANGO_SECRET_KEY: "{{ secret_key.content | b64decode }}"
|
||||
DJANGO_ALLOWED_HOST: "{{ django_allowed_host }}"
|
||||
DATABASE_URL: "postgresql://gamearray:{{ postgres_password }}@gamearray_postgres/gamearray"
|
||||
MAILGUN_API_KEY: "{{ mailgun_api_key }}"
|
||||
CELERY_BROKER_URL: "redis://gamearray_redis:6379/0"
|
||||
networks:
|
||||
- name: gamearray_net
|
||||
command: "python -m celery -A core worker -l info"
|
||||
|
||||
|
||||
- name: Create static files directory
|
||||
ansible.builtin.file:
|
||||
path: /var/www/gamearray/static
|
||||
|
||||
@@ -17,6 +17,16 @@ docker run -d --name gamearray \
|
||||
-p 127.0.0.1:8888:8888 \
|
||||
"$IMAGE"
|
||||
|
||||
echo "==> Stopping old celery worker..."
|
||||
docker stop gamearray_celery 2>/dev/null || true
|
||||
docker rm gamearray_celery 2>/dev/null || true
|
||||
|
||||
echo "==> Starting new celery worker..."
|
||||
docker run -d --name gamearray_celery \
|
||||
--env-file /opt/gamearray/gamearray.env \
|
||||
--network gamearray_net \
|
||||
"$IMAGE" python -m celery -A core worker -l info
|
||||
|
||||
echo "==> Running migrations..."
|
||||
docker exec gamearray python ./manage.py migrate
|
||||
|
||||
|
||||
@@ -3,3 +3,4 @@ DJANGO_SECRET_KEY={{ secret_key.content | b64decode }}
|
||||
DJANGO_ALLOWED_HOST={{ django_allowed_host }}
|
||||
DATABASE_URL=postgresql://gamearray:{{ postgres_password }}@gamearray_postgres/gamearray
|
||||
MAILGUN_API_KEY={{ mailgun_api_key }}
|
||||
CELERY_BROKER_URL=redis://gamearray_redis:6379/0
|
||||
|
||||
Reference in New Issue
Block a user