introduce sqlx migrations
This commit is contained in:
parent
ee79869327
commit
80fcc9d5b6
2 changed files with 4 additions and 1 deletions
|
|
@ -17,6 +17,8 @@ RUN apk add --no-cache libgcc
|
|||
RUN apk add --no-cache ffmpeg python3 py3-pip
|
||||
RUN pip install --break-system-packages yt-dlp
|
||||
|
||||
COPY --from=0 /app/target/release/mk-dl-bot .
|
||||
WORKDIR /app
|
||||
COPY migrations /app/
|
||||
COPY --from=0 /app/target/release/mk-dl-bot /app/
|
||||
|
||||
ENTRYPOINT ["/mk-dl-bot"]
|
||||
|
|
@ -50,6 +50,7 @@ pub async fn bot_main() -> anyhow::Result<()> {
|
|||
}
|
||||
|
||||
let db = SqlitePool::connect(&db_url).await?;
|
||||
sqlx::migrate!().run(&db).await?;
|
||||
|
||||
let bot = Bot::new(env::var("BOT_TOKEN")?);
|
||||
let listener = Polling::builder(bot.clone())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue