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