From 190b3ca028b264755d51cde2d22dddd79bf48e09 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 6 Feb 2024 17:34:43 +0400 Subject: [PATCH] fix ci/cd --- docker-compose.yaml | 11 +++++------ {database => src/sql}/init.sql | 4 +++- 2 files changed, 8 insertions(+), 7 deletions(-) rename {database => src/sql}/init.sql (99%) diff --git a/docker-compose.yaml b/docker-compose.yaml index 54fc005..ca6b3c0 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,13 +9,12 @@ services: - DEVELOPER_CHAT_ID=${DEVELOPER_CHAT_ID} volumes: - sqlite_data:/database -# command: ["python", "-m", "sqlite3", "${SQLITE_DB_FILE_PATH}", "<", "database/init.sql"] + entrypoint: ["/bin/sh", "-c"] command: - - sh - - -c - - python -m sqlite3 ${SQLITE_DB_FILE_PATH} < database/init.sql - - python -m src/__main__.py - restart: always + - | + python -m sqlite3 &{SQLITE_DB_FILE_PATH} < src/sql/init.sql && + python src/__main__.py +# restart: always sqlitebrowser: image: linuxserver/sqlitebrowser diff --git a/database/init.sql b/src/sql/init.sql similarity index 99% rename from database/init.sql rename to src/sql/init.sql index 1e107a7..37fd704 100644 --- a/database/init.sql +++ b/src/sql/init.sql @@ -46,4 +46,6 @@ CREATE TABLE IF NOT EXISTS records ( FOREIGN KEY (creator_id) REFERENCES players(id), FOREIGN KEY (game_id) REFERENCES games(id), FOREIGN KEY (playroom_id) REFERENCES playrooms(id) -); \ No newline at end of file +); + +.quit \ No newline at end of file