julianpoy / RecipeSage-selfhost

A collection of configuration files to host your own private instance of RecipeSage for personal use.
https://recipesage.com
Other
123 stars 28 forks source link

error on activate.sh #72

Closed eikaramba closed 9 months ago

eikaramba commented 9 months ago

Describe the issue i get the following error on ./activate.sh xxxx@xxxx.org

Database connection established
TypeError: Cannot read properties of undefined (reading 'expiresIn')
    at Object.extend (/app/packages/backend/src/services/subscriptions.js:22:62)
    at run (/app/packages/backend/src/activate.js:22:29

Please do the following and check the boxes before filing [x] I have attached my docker-compose.yaml to the issue [x] I have attached the logs for my api container to the issue [ ] My issue is related to this selfhost repo, not the main tracker for RecipeSage here

compose file is the same as in the repo. api unfortuantely is not outputting anything upon doing the command

# This config file is for RecipeSage-selfhost version 4.0.0, and RecipeSage version 2.13.1.

version: "3.7" # (this is the docker compose version, not RecipeSage version)
services:
  proxy:
    # The proxy must not be removed. If needed, point your own proxy to this container, rather than removing this
    container_name: recipesage_proxy
    image: julianpoy/recipesage-selfhost-proxy:v4.0.0
    ports:
      - 7270:80
    depends_on:
      - static
      - api
      - pushpin
    restart: unless-stopped
  static:
    # Hosts frontend assets
    container_name: recipesage_static
    image: julianpoy/recipesage-selfhost:static-v2.13.1
    restart: unless-stopped
  api:
    # Hosts backend API
    container_name: recipesage_api
    image: julianpoy/recipesage-selfhost:api-v2.13.1
    depends_on:
      - postgres
      - typesense
      - pushpin
      - browserless
    # Swap commands if you want to disable automatic migrations on startup
    command: sh -c "npx prisma migrate deploy; npx ts-node --swc --project
      packages/backend/tsconfig.json packages/backend/src/bin/www"
    # command: npx ts-node --swc --project packages/backend/tsconfig.json packages/backend/src/bin/www
    environment:
      - STORAGE_TYPE=filesystem
      - FILESYSTEM_STORAGE_PATH=/rs-media
      - NODE_ENV=selfhost
      - VERBOSE=false
      - VERSION=selfhost
      - POSTGRES_DB=recipesage_selfhost
      - POSTGRES_USER=recipesage_selfhost
      - POSTGRES_PASSWORD=recipesage_selfhost
      - POSTGRES_PORT=5432
      - POSTGRES_HOST=postgres
      - POSTGRES_SSL=false
      - POSTGRES_LOGGING=false
      - DATABASE_URL=postgresql://recipesage_selfhost:recipesage_selfhost@postgres:5432/recipesage_selfhost
      - GCM_KEYPAIR
      - SENTRY_DSN
      - GRIP_URL=http://pushpin:5561/
      - GRIP_KEY=changeme
      - SEARCH_PROVIDER=typesense
      - 'TYPESENSE_NODES=[{"host": "typesense", "port": 8108, "protocol":
        "http"}]'
      - TYPESENSE_API_KEY=recipesage_selfhost
      - STRIPE_SK
      - STRIPE_WEBHOOK_SECRET
      - BROWSERLESS_HOST=browserless
      - BROWSERLESS_PORT=3000
      - INGREDIENT_INSTRUCTION_CLASSIFIER_URL=http://ingredient-instruction-classifier:3000/
    volumes:
      - apimedia:/rs-media
    restart: unless-stopped
  typesense:
    # Provides the fuzzy search engine
    container_name: recipesage_typesense
    image: typesense/typesense:0.24.1
    volumes:
      - typesensedata:/data
    command: --data-dir /data --api-key=recipesage_selfhost --enable-cors
    restart: unless-stopped
  pushpin:
    # Provides websocket support
    container_name: recipesage_pushpin
    image: julianpoy/pushpin:2023-09-17
    entrypoint: /bin/sh -c
    command:
      - sed -i "s/sig_key=changeme/sig_key=$$GRIP_KEY/"
        /etc/pushpin/pushpin.conf && echo "* $${TARGET},over_http" >
        /etc/pushpin/routes && pushpin --merge-output
    environment:
      - GRIP_KEY=changeme
      - TARGET=api:3000
    restart: unless-stopped
  postgres:
    # Database
    container_name: recipesage_postgres
    image: postgres:16
    environment:
      - POSTGRES_DB=recipesage_selfhost
      - POSTGRES_USER=recipesage_selfhost
      - POSTGRES_PASSWORD=recipesage_selfhost
    volumes:
      - postgresdata:/var/lib/postgresql/data
    restart: unless-stopped
  browserless:
    # A headless browser for scraping websites with the auto import tool
    container_name: recipesage_browserless
    image: browserless/chrome:1.61.0-puppeteer-21.4.1
    environment:
      - MAX_CONCURRENT_SESSIONS=3
      - MAX_QUEUE_LENGTH=10
    restart: unless-stopped
  # Uncomment the lines below to enable the ingredient instruction classifier. It's somewhat resource intensive and requires AVX instruction support on your CPU, but does improve site compatibility for the automatic import tool.

  # ingredient-instruction-classifier: # A mini server that runs a machine learning model able to classify text for improved automatic import site support. Not required for application to run, and will crash if your CPU does not support AVX instructions
  #   container_name: recipesage_classifier
  #   image: julianpoy/ingredient-instruction-classifier:1.4.11
  #   environment:
  #     - SENTENCE_EMBEDDING_BATCH_SIZE=200
  #     - PREDICTION_CONCURRENCY=2
  #   restart: unless-stopped

volumes:
  apimedia:
    driver: local
  typesensedata:
    driver: local
  postgresdata:
    driver: local
julianpoy commented 9 months ago

Hi there, thanks for the detail here. Fixed in this commit: 7f1418b04f51c6b227ef75d69601aee4a0feece7