0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
posthog/.platform/applications.yaml
Marius Andra b8d1ba43f4
Disable celery heartbeat, gossip and mingle (#2513)
* disable celery heartbeat, gossip and mingle

* keep the heartbeat

* beat doesn't want these params

* add back "without heartbeat"
2020-11-26 12:44:10 +01:00

37 lines
1.4 KiB
YAML

- name: app
type: 'python:3.8'
build:
flavor: none
relationships:
postgresdatabase: "dbpostgres:postgresql"
cache: "redis:redis"
hooks:
build: |
# Install NVM and a recet version of node
unset NPM_CONFIG_PREFIX
NVM_VERSION="v0.35.3"
curl -o- https://raw.githubusercontent.com/creationix/nvm/$NVM_VERSION/install.sh | dash
NVM_DIR="$PLATFORM_APP_DIR/.nvm"
mkdir -p $PLATFORM_CACHE_DIR/.nvm
mkdir -p $NVM_DIR/.cache
ln -s $PLATFORM_CACHE_DIR/.nvm $NVM_DIR/.cache
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install stable
pip install -r requirements.txt
npm install -g yarn
yarn install
yarn build
python manage.py collectstatic --noinput
deploy: python manage.py migrate
web:
commands:
start: "gunicorn posthog.wsgi --log-file -"
variables:
env:
DATABASE_URL: postgres://main:main@postgresdatabase.internal:5432/main
REDIS_URL: redis://cache.internal:6379
NODE_OPTIONS: --max_old_space_size=1536
workers:
worker:
commands:
start: celery -A posthog worker --beat --scheduler redbeat.RedBeatScheduler --loglevel=info --pidfile="/tmp/celerybeat.pid" --concurrency=2 --without-heartbeat --without-gossip --without-mingle