mirror of
https://github.com/Viren070/MediaFusion.git
synced 2025-12-01 23:21:11 +01:00
Deployed in oracle cloud kubernetes cluster
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
.env
|
||||
.idea/
|
||||
*.service
|
||||
|
||||
http-client.private.env.json
|
||||
|
||||
127.0.0.1.pem
|
||||
127.0.0.1-key.pem
|
||||
|
||||
resources/poster_cache
|
||||
@@ -0,0 +1,22 @@
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
WORKDIR /mediafusion
|
||||
|
||||
COPY ../Pipfile Pipfile.lock ./
|
||||
|
||||
# Install dependencies
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install pipenv && \
|
||||
apt-get update && \
|
||||
apt-get install -y git
|
||||
|
||||
|
||||
RUN pipenv install --deploy --ignore-pipfile
|
||||
|
||||
# Copy the source code
|
||||
COPY .. .
|
||||
|
||||
# Expose the port
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["pipenv", "run", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "80"]
|
||||
@@ -0,0 +1,93 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mediafusion-deployment
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mediafusion
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
maxSurge: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mediafusion
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: ocirsecret
|
||||
containers:
|
||||
- name: mediafusion
|
||||
image: ap-singapore-1.ocir.io/axykuon5aont/mediafusion:v3.6.5
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: MONGO_URI
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mediafusion-secrets
|
||||
key: MONGO_URI
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: mediafusion-secrets
|
||||
key: SECRET_KEY
|
||||
- name: HOST_URL
|
||||
value: "https://mediafusion.fun"
|
||||
- name: ENABLE_SCRAPPER
|
||||
value: "false"
|
||||
- name: POSTER_CACHE_PATH
|
||||
value: "/covers"
|
||||
volumeMounts:
|
||||
- name: mediafusion-volume
|
||||
mountPath: /covers
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 80
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 60
|
||||
failureThreshold: 5
|
||||
timeoutSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 10
|
||||
volumes:
|
||||
- name: mediafusion-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: mediafusion-pvc
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mediafusion-service
|
||||
spec:
|
||||
selector:
|
||||
app: mediafusion
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
type: LoadBalancer
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mediafusion-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
Reference in New Issue
Block a user