docker-library / ghost

Docker Official Image packaging for Ghost
https://hub.docker.com/_/ghost
MIT License
738 stars 313 forks source link

Fresh Install: ERROR Migration lock was never released or currently a migration is running. Migration lock was never released or currently a migration is running. #337

Closed mtthidoteu closed 1 year ago

mtthidoteu commented 2 years ago

Hey! Every time I install this image I ALWAYS face this issue. I am on a brand new installation with all directories empty and can't figure out why this is happeningl

version: '3.1'
services:
  ghost:
    image: ghost
    restart: unless-stopped
    environment:
      # see https://ghost.org/docs/config/#configuration-options
      - database__client=mysql
      - database__connection__host=ghostdb
      - database__connection__user=ghostuser
      - database__connection__password=
      - database__connection__database=ghost
      - url=https://
      - NODE_ENV=production
    networks:
      - default
      - web
    volumes:
      - ./ghost_data:/var/lib/ghost/content
    depends_on:
      - ghostdb

  ghostdb:
    image: lscr.io/linuxserver/mariadb:latest
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=
      - MYSQL_USER=ghostuser
      - MYSQL_PASSWORD=
      - MYSQL_DATABASE=ghost
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - ./db_data:/config
    networks:
      - default

networks:
  default:
  web:
    external: True

obviously some elements are censored. I can't figure out what is wrong with my installation!

wglambert commented 2 years ago

There is a docker-controlled volume that could be persisting data https://github.com/docker-library/ghost/blob/fa62084cb02566522f5772d14fee14cfe439885c/5/debian/Dockerfile#L122

You could try a docker-compose down -v to remove all docker-controlled volume