victor-rds/docker-etebase

Migration from earlier version

Closed this issue · 9 comments

Hey there, I'm running one of the early builds (from when you offered alpine 3.6 and 3.7 as options). I've tried spinning up the latest version, both by building the Alpine version myself, and by pulling your docker image - both of these don't seem to work.

When using my existing DB, I'm getting error 500's when logging in to /admin. When trying to run it with creating a new DB, it never seems to write anything to disk. Directory owned as 1000:1000 which I believe you're running as - tried http + django as servers (same results on both). Any suggestions?

Edit: From what I can tell, it's chucking the SQLite file in the /etesync folder instead of /data, and having it owned as root instead of ID 1000.

I also ran into this. Workaround for me was to mount the existing database file into the container directly at /etesync/db.sqlite3: /path/to/db.sqlite3:/etesync/db.sqlite3, and then set the ETESYNC_DB_PATH environment variable to /etesync. It found the database, and started up just fine then. Both etesync itself and the admin pages work.

@ProjectMoon Awesome - did the trick for me too :) Actually didn't realise you could mount files direct in docker - thought it was directories only! Appreciate the insight (though curious how this was working for project author)!

Is this the same issue I have as desribed here? #6
I tried to do what @ProjectMoon said with docker-compose:

version: "3"

services:
  etesync:
    image: victorrds/etesync:alpine
    restart: always
    volumes:
      - /home/user/etesync/data:/etesync
    environment:
      SUPER_USER: "admin"
      SUPER_PASS: "censored"
      SERVER: "http-socket"
      ETESYNC_DB_PATH: "/etesync"
    networks:
      - etesync

but then I get this error:

etesync_1           | Starting ETESync
etesync_1           | realpath() of etesync.ini failed: No such file or directory [core/utils.c line 3654]

If you mount the data directory to /etesync, you will overwrite the entirety of the etesync directory, which will wipe out all the files that would be there in the container.

vocux commented

I've never used any previous version but also get the 500 error when trying to hook up a client or log in at the admin page. I can't get anything to work.

Tried @ProjectMoon s suggestion:

etesync:
    image: victorrds/etesync
    container_name: 'etesync'
    environment:
      SERVER: http
      SUPER_USER: test
      SUPER_PASS: test
      ETESYNC_DB_PATH: "/etesync"
    restart: always
    volumes:
      - ./etesync/db.sqlite3:/etesync/db.sqlite3
    ports:
      - 80:3735

It never writes any database files.

Also a completely 'clean' version as suggested in the readme doesn't work:

  etesync:
      image: victorrds/etesync
      container_name: 'etesync'
      environment:
        SERVER: http
        SUPER_USER: test
        SUPER_PASS: test
      restart: always
      ports:
        - 80:3735

I get the same error.

Am I overlooking something major here?

@vocux
The container also has some permission issues as mentioned by @stevesbrain.

I ran into these issues, too. Since there are open pull requests (like #8) and no responses from the author @victor-rds, I forked this repo and pushed the container on dockerhub (grburst/etesync).

@besendorf @vocux
I added a docker-compose file example at docker hub, too. I tested it with the alpine container.

version: '3'

services:
  etesync:
    container_name: etesync
    image: grburst/etesync:alpine
    restart: always
    ports:
      - "80:3735"
    volumes:
      - data-etesync:/data
    environment:
      SERVER: ${SERVER:-uwsgi}
      SUPER_USER: ${SUPER_USER:-admin}
      SUPER_PASS: ${SUPER_PASS:-admin}

volumes:
  data-etesync:
vocux commented

@GRBurst Works like a charm, thank you! :)

I've revamped the Dockerfile, and since someone already forked and fixed I will close this