diff --git a/.envrc.sample b/.envrc.sample index 6193d4c..99e7a90 100644 --- a/.envrc.sample +++ b/.envrc.sample @@ -1,6 +1,6 @@ export CELERY_BROKER_URL=redis://localhost:6379 export CELERY_RESULT_BACKEND=redis://localhost:6379 -export FLASK_APP=wsgi:app +export FLASK_APP=scripts.wsgi:app export FLASK_ENV=development export REDIS_HOST=localhost export REDIS_PORT=6379 diff --git a/README.md b/README.md index 0e168fc..e36af1a 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ $ cd magic-app ### Docker Way ``` +$ cd docker $ docker-compose up ``` diff --git a/celerybeat-schedule b/celerybeat-schedule new file mode 100644 index 0000000..ed428e5 Binary files /dev/null and b/celerybeat-schedule differ diff --git a/docker-compose.yml b/docker-compose.yml index 667c115..047f580 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,11 +5,12 @@ x-env: &env environment: CELERY_BROKER_URL: "redis://redis:6379" CELERY_RESULT_BACKEND: "redis://redis:6379" - FLASK_APP: "wsgi:app" + FLASK_APP: "scripts.wsgi:app" FLASK_ENV: "development" REDIS_HOST: "redis" REDIS_PORT: "6379" REDIS_SESSION_DB: "0" + SECRET_KEY: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" services: flask: @@ -28,7 +29,7 @@ services: <<: *env command: | poetry run - celery worker -A celworker.celery -B -l debug + celery worker -A scripts.celworker.celery volumes: - "./:/magic_app/" diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/celworker.py b/scripts/celworker.py similarity index 100% rename from celworker.py rename to scripts/celworker.py diff --git a/wsgi.py b/scripts/wsgi.py similarity index 100% rename from wsgi.py rename to scripts/wsgi.py