mirror of
https://github.com/wahyd4/you-music.git
synced 2026-08-08 20:59:47 +10:00
update k8s
This commit is contained in:
+21
-7
@@ -50,20 +50,27 @@ spec:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: youmusic-data-pvc
|
||||
|
||||
|
||||
# Init container to run database migrations
|
||||
initContainers:
|
||||
- name: youmusic-migrations
|
||||
image: "ghcr.io/wahyd4/youmusic:latest"
|
||||
image: "ghcr.io/wahyd4/you-music:latest"
|
||||
imagePullPolicy: Always
|
||||
command: ["/bin/bash", "/app/backend/run-migrations.sh"]
|
||||
workingDir: /app/backend
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
echo "🔄 Running database migrations..."
|
||||
alembic upgrade head
|
||||
echo "✅ Migrations complete!"
|
||||
env:
|
||||
- name: PYTHONUNBUFFERED
|
||||
value: "1"
|
||||
- name: PYTHONPATH
|
||||
value: "/app/backend"
|
||||
- name: DATABASE_URL
|
||||
value: "sqlite+aiosqlite:///./data/youmusic.db"
|
||||
value: "sqlite+aiosqlite:////app/data/youmusic.db"
|
||||
- name: MUSIC_DIR
|
||||
value: "/app/data/music"
|
||||
- name: UPLOAD_DIR
|
||||
@@ -75,11 +82,18 @@ spec:
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/data
|
||||
|
||||
|
||||
containers:
|
||||
- name: youmusic
|
||||
image: "ghcr.io/wahyd4/youmusic:latest" # Update with your image
|
||||
image: "ghcr.io/wahyd4/you-music:latest" # Update with your image
|
||||
imagePullPolicy: Always
|
||||
workingDir: /app/backend
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
echo "🚀 Starting YouMusic application..."
|
||||
exec uvicorn main:app --host 0.0.0.0 --port 8000
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /app/data
|
||||
@@ -89,7 +103,7 @@ spec:
|
||||
- name: PYTHONPATH
|
||||
value: "/app/backend"
|
||||
- name: DATABASE_URL
|
||||
value: "sqlite+aiosqlite:///./data/youmusic.db"
|
||||
value: "sqlite+aiosqlite:////app/data/youmusic.db"
|
||||
- name: MUSIC_DIR
|
||||
value: "/app/data/music"
|
||||
- name: LOCAL_MUSIC_DIR
|
||||
|
||||
Reference in New Issue
Block a user