# Liquibase migration image — запускается Helm pre-upgrade Job (1-shot, без Spring Boot)
FROM repo.nstart.cloud/liquibase/liquibase:4.27.0

USER root
COPY src/main/resources/db/changelog /liquibase/changelog
USER liquibase

ENV LIQUIBASE_COMMAND_CHANGELOG_FILE=/liquibase/changelog/master.xml

# Helm Job переопределяет JDBC URL через ENV
# CMD: ["update"] (default из base image работает с LIQUIBASE_COMMAND_*)
