mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
Compare commits
3 Commits
merge/back
...
8edaaee117
| Author | SHA1 | Date | |
|---|---|---|---|
| 8edaaee117 | |||
|
|
4cb09bb053 | ||
| dd0ca4b4f1 |
2
.github/workflows/workflow.yml
vendored
2
.github/workflows/workflow.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-update:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: kbctl
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
@@ -23,9 +23,10 @@ if not DATABASE_URL:
|
||||
mariadb_password = os.getenv("MARIADB_PASSWORD", "strongpassword")
|
||||
DATABASE_URL = f"mysql+pymysql://{mariadb_user}:{mariadb_password}@{mariadb_host}:{mariadb_port}/{mariadb_db}"
|
||||
|
||||
# Use synchronous driver for Alembic migrations
|
||||
SYNC_DATABASE_URL = DATABASE_URL.replace("+asyncmy", "+pymysql")
|
||||
|
||||
ssl_enabled = os.getenv("MARIADB_HOST", "localhost") != "localhost"
|
||||
connect_args = {"ssl": {"ssl": True}} if ssl_enabled else {}
|
||||
|
||||
def run_migrations_offline() -> None:
|
||||
context.configure(
|
||||
@@ -39,7 +40,7 @@ def run_migrations_offline() -> None:
|
||||
|
||||
|
||||
def run_migrations_online() -> None:
|
||||
connectable = create_engine(SYNC_DATABASE_URL, poolclass=pool.NullPool)
|
||||
connectable = create_engine(SYNC_DATABASE_URL, poolclass=pool.NullPool, connect_args=connect_args)
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
|
||||
@@ -14,7 +14,7 @@ spec:
|
||||
app: app-demo
|
||||
spec:
|
||||
containers:
|
||||
- image: lukastrkan/cc-app-demo@sha256:d320eefb9dee05dc0f0ec5a2ca90daae7ca8c2af0088dc6b88eee076486c0f3b
|
||||
- image: lukastrkan/cc-app-demo@sha256:75634b4d97282b6b8424fe17767c81adf44af5f7359c1d25883073b5629b3e05
|
||||
name: app-demo
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
|
||||
@@ -14,7 +14,7 @@ spec:
|
||||
app: app-demo-worker
|
||||
spec:
|
||||
containers:
|
||||
- image: lukastrkan/cc-app-demo@sha256:d320eefb9dee05dc0f0ec5a2ca90daae7ca8c2af0088dc6b88eee076486c0f3b
|
||||
- image: lukastrkan/cc-app-demo@sha256:75634b4d97282b6b8424fe17767c81adf44af5f7359c1d25883073b5629b3e05
|
||||
name: app-demo-worker
|
||||
command:
|
||||
- python3
|
||||
|
||||
Reference in New Issue
Block a user