[solved] Persist data between drone-server restarts

I read that data (runs, secrets, etc.) should be stored by default in a sqlite database. My docker-compose.yml begins as follows:

services:
  drone-server:
    image: drone/drone:1.10
    container_name: drone-server
    ports:
      - 8088:80
      - 9000:443
    volumes:
      - drone-data:/var/lib/drone
    restart: always

taken from here: deploy-drone/docker-compose.yml at master · auxilincom/deploy-drone · GitHub

However, whenever I restart the drone-server, my settings are gone.
So, how can I make those settings persistent across reboots?

A side effect when working with drone that way is that secrets do not seem to get shared accross branches. Strange. When I open a MR it starts two builds. One succeeds, the other doesn’t. I’m using the appleboy ssh plugin which on the failling complaints that no password was provided. Very strange.

Edit: just learned that these dupliate builds are rather due to a misconfiguration. Duplicate builds when pushing to branch with open pull request
Still, the initial problems remains the same.

You should be mounting /data, not /var/lib/drone. I see a few other issues with both the server and runner (agent) configuration in that sample, including use of deprecated images.

I recommend using our official install docs:
https://docs.drone.io/server/provider/github/

1 Like