add celery background tasks and redis server for celery, also modify django to use redis instead of postgres for caching for speed improvement and alleviating sql traffic
This commit is contained in:
parent
eeae7ae675
commit
f530790f6c
9 changed files with 313 additions and 32 deletions
|
|
@ -48,8 +48,6 @@ services:
|
|||
image: getfider/fider:stable
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./certs:/certs
|
||||
cadvisor:
|
||||
volumes:
|
||||
- /:/rootfs:ro
|
||||
|
|
@ -61,6 +59,25 @@ services:
|
|||
devices:
|
||||
- /dev/kmsg
|
||||
image: gcr.io/cadvisor/cadvisor:v0.52.1
|
||||
redis:
|
||||
image: redis:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 6379:6379
|
||||
# anubis:
|
||||
# image: ghcr.io/techarohq/anubis:latest
|
||||
# env_file:
|
||||
# - .env
|
||||
# dockergen:
|
||||
# image: jwilder/docker-gen:latest
|
||||
# container_name: dockergen_gatus_config
|
||||
# command: -watch -notify-sighup gatus_service -only-exposed /app/config.template.yml /app/config.yaml
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
# - ./gatus:/app
|
||||
# depends_on:
|
||||
# - health
|
||||
health:
|
||||
image: twinproduction/gatus:latest
|
||||
restart: always
|
||||
|
|
@ -69,8 +86,4 @@ services:
|
|||
environment:
|
||||
- GATUS_DELAY_START_SECONDS=30
|
||||
volumes:
|
||||
- ./gatus/config.yaml:/config/config.yaml
|
||||
- ./certs:/certs
|
||||
# secrets:
|
||||
# env_file_base64:
|
||||
# environment: ENV_FILE_BASE64
|
||||
- ./gatus:/config
|
||||
|
|
@ -1,14 +1,17 @@
|
|||
x-common: &common
|
||||
image: badbl0cks/pkmntrade-club:staging
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DEBUG=True
|
||||
- DISABLE_SIGNUPS=True
|
||||
- PUBLIC_HOST=staging.pkmntrade.club
|
||||
- ALLOWED_HOSTS=staging.pkmntrade.club,127.0.0.1
|
||||
|
||||
services:
|
||||
web-staging:
|
||||
image: badbl0cks/pkmntrade-club:staging
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DEBUG=True
|
||||
- DISABLE_SIGNUPS=True
|
||||
- PUBLIC_HOST=staging.pkmntrade.club
|
||||
- ALLOWED_HOSTS=staging.pkmntrade.club,127.0.0.1
|
||||
<<: *common
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
|
|
@ -17,4 +20,7 @@ services:
|
|||
# interval: 30s
|
||||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 30s
|
||||
# start_period: 30s
|
||||
celery-staging:
|
||||
<<: *common
|
||||
command: ["celery", "-A", "pkmntrade_club.django_project", "worker", "-l", "INFO", "-B", "-E"]
|
||||
|
|
@ -1,17 +1,20 @@
|
|||
x-common: &common
|
||||
restart: always
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- DEBUG=False
|
||||
- DISABLE_SIGNUPS=True
|
||||
- PUBLIC_HOST=pkmntrade.club
|
||||
- ALLOWED_HOSTS=pkmntrade.club,127.0.0.1
|
||||
|
||||
services:
|
||||
web:
|
||||
<<: *common
|
||||
image: ghcr.io/xe/x/httpdebug
|
||||
entrypoint: ["/ko-app/httpdebug", "--bind", ":8000"]
|
||||
#image: badbl0cks/pkmntrade-club:stable
|
||||
#command: ["granian", "--interface", "wsgi", "pkmntrade_club.django_project.wsgi:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--workers-kill-timeout", "180", "--access-log"]
|
||||
# env_file:
|
||||
# - .env
|
||||
# environment:
|
||||
# - DEBUG=False
|
||||
# - DISABLE_SIGNUPS=True
|
||||
# - PUBLIC_HOST=pkmntrade.club
|
||||
# - ALLOWED_HOSTS=pkmntrade.club,127.0.0.1
|
||||
restart: always
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 4
|
||||
|
|
@ -21,8 +24,7 @@ services:
|
|||
# timeout: 10s
|
||||
# retries: 3
|
||||
# start_period: 30s
|
||||
# secrets:
|
||||
# - env_file_base64
|
||||
# secrets:
|
||||
# env_file_base64:
|
||||
# environment: ENV_FILE_BASE64
|
||||
celery:
|
||||
<<: *common
|
||||
image: badbl0cks/pkmntrade-club:stable
|
||||
command: ["celery", "-A", "pkmntrade_club.django_project", "worker", "-l", "INFO", "-B", "-E"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue