502 Gateway error in Nextcloud container

Hello everyone, I am trying to use the GitHub - linuxserver/docker-nextcloud nextcloud container, but when I install it via docker-compose (using the default config specified in the instructions), I get a 502 bad gateway right after I enter the admin credentials to set it up in the browser. After a few minutes, I do see this error in the docker-compose logs:

Exception: Not installed in /config/www/nextcloud/lib/base.php:277
nextcloud_temp  | Stack trace:
nextcloud_temp  | #0 /config/www/nextcloud/lib/base.php(649): OC::checkInstalled()
nextcloud_temp  | #1 /config/www/nextcloud/lib/base.php(1089): OC::init()
nextcloud_temp  | #2 /config/www/nextcloud/cron.php(43): require_once('/config/www/nex...')
nextcloud_temp  | #3 {main}

This is the small docker-compose.yml section for the container:

nextcloud_temp:
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud_temp
    volumes:
      - config_nc:/config
      - data_nc:/data
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
    ports:
      - 4043:443
    restart: unless-stopped

Not really sure how to solve this error, if someone has any ideas, please let me know. I can provide more logging if someone needs them. Thanks!