victor-rds / docker-etebase

Docker image files for Etebase server
GNU Affero General Public License v3.0
95 stars 28 forks source link

Configuration file, and then SQLite database aren't created if `TIME_ZONE` is set #122

Closed poperigby closed 2 years ago

poperigby commented 2 years ago

When I first start the container, I get this error: stat: cannot statx '/data/etebase-server.ini': No such file or directory I have to restart the container for it to be generated. After I start the container again, I get this: stat: cannot statx '/data/db.sqlite3': No such file or directory

Docker Compose file:

services:
  backend:
    image: victorrds/etesync
    container_name: etebase
    environment:
        - SERVER=uvicorn
        - DB_ENGINE=sqlite
        - TIME_ZONE=UTC-8
    volumes:
        - data:/data
volumes:
  data:
networks:
  default:
    name: reverse_proxy
    external: true

If I remove the TIME_ZONE variable, the container starts just fine and creates the configuration file and database.

victor-rds commented 2 years ago

Sorry, I will look at this ASAP.

victor-rds commented 2 years ago

The problem is the value you used, I tried a manual initial database migration and received the error: ValueError: Incorrect timezone setting: UTC-8, in django you must use a valid tz database name, for example UTC-8 can be America/Los_Angeles. using this the image started successfully.

I will update the README, and fix the script to log this error.