havenweb/haven

Missing settings on new run

Scaffale opened this issue · 1 comments

Started through docker_compose (see below) and after first login it was a 500 error.
Reading the production.log (inside the container) it was missing @setting so I run Setting.create and it worked.

version: '3.7'
services:
  haven:
    container_name: 'haven-blog'
    image: ghcr.io/havenweb/haven:22dc990
    depends_on:
      - postgresql
    ports:
      - "5030:3000"
    volumes:
      - $BASE_FOLDER_DOCKER/haven_storage:/storage
    environment:
      - RAILS_ENV=production
      - HAVEN_DB_HOST=postgresql
      - HAVEN_DB_NAME=haven
      - HAVEN_DB_ROLE=haven
      - HAVEN_DB_PASSWORD=$HAVEN_DB_PASSWORD
      - HAVEN_USER_EMAIL=$HAVEN_USER_EMAIL
      - HAVEN_USER_PASS=$HAVEN_USER_PASS

  postgresql:
    image: postgres:13.2-alpine
    ports:
      - "5432:5432"
    # https://www.postgresql.org/docs/current/static/non-durability.html
    command: [
      "postgres",
      "-c", "max_connections=1000",
      "-c", "synchronous_commit=off",
      "-c", "fsync=off",
      "-c", "full_page_writes=off",
      "-c", "max_wal_size=4GB",
      "-c", "checkpoint_timeout=30min",
      "-c", "wal_level=logical"
    ]
    environment:
      POSTGRES_HOST_AUTH_METHOD: trust
      POSTGRES_USER: haven
    volumes:
      - $BASE_FOLDER_DOCKER/postgresqldata:/var/lib/postgresql/data

volumes:
  postgresqldata:
    external: false
  haven_storage:
    external: false

Thank you for reporting this! I've been adding tests and messed this up with an accidental difference between the test environment and the deployment environment. Fixed in this commit: 01c0e54