1
Fork 0
mirror of https://github.com/wlinator/luminara.git synced 2024-10-02 20:23:12 +00:00

Rename some things to make more sense

This commit is contained in:
wlinator 2024-06-20 12:56:07 +02:00
parent f8f663985c
commit 7185e734a7
4 changed files with 9 additions and 8 deletions

3
.gitignore vendored
View file

@ -1,6 +1,7 @@
venv/
.idea/
__pycache__/
.run/
*.db
.env
@ -8,4 +9,4 @@ __pycache__/
users.yml
db/data/
db/init/v2-update.sql
db/migrations/100-dump.sql

View file

@ -16,7 +16,7 @@ services:
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
volumes:
- debuglog:/usr/src/app/logs
- debug_log:/usr/src/app/logs
depends_on:
db:
condition: service_healthy
@ -30,8 +30,8 @@ services:
MARIADB_PASSWORD: ${MARIADB_PASSWORD}
MARIADB_DATABASE: ${MARIADB_DATABASE}
volumes:
- ./db/init:/docker-entrypoint-initdb.d/
- dbdata:/var/lib/mysql/
- ./db/migrations:/docker-entrypoint-initdb.d/
- database:/var/lib/mysql/
healthcheck:
test: [ "CMD", "mariadb", "-h", "localhost", "-u", "${MARIADB_USER}", "-p${MARIADB_PASSWORD}", "-e", "SELECT 1" ]
interval: 5s
@ -45,5 +45,5 @@ services:
- 8080:8080
volumes:
dbdata:
debuglog:
database:
debug_log:

View file

@ -30,11 +30,11 @@ async def create_db_backup(dbx, path="db/rcu.db"):
backup_name += f"_lumi.sql"
command = f"mariadb-dump --user={mariadb_user} --password={mariadb_password} " \
f"--host=db --single-transaction --all-databases > ./db/init/2-data.sql"
f"--host=db --single-transaction --all-databases > ./db/migrations/100-dump.sql"
subprocess.check_output(command, shell=True)
with open("./db/init/2-data.sql", "rb") as f:
with open("./db/migrations/100-dump.sql", "rb") as f:
dbx.files_upload(f.read(), f"/{backup_name}")