Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dockerBuildX.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
context: .
push: true
# platforms: linux/amd64,linux/arm64
platforms: linux/arm64
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

.vscode

# dependencies
/node_modules
/.pnp
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ COPY --from=builder /app/public ./public
EXPOSE 3000

# Start the server after pushing the database schema
CMD ["sh", "-c", "npm run db-push && npm run start"]
CMD ["sh", "-c", "npm run start"]
7 changes: 4 additions & 3 deletions helm/app/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ spec:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- with .Values.env }}
env:
{{- toYaml . | nindent 12 }}
{{- if .Values.envSecretName }}
envFrom:
- secretRef:
name: {{ .Values.envSecretName }}
{{- end }}
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
Expand Down
82 changes: 25 additions & 57 deletions helm/app/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# Default values for torch.cloud.
# This is a YAML-formatted file.

# Install PostgreSQL using Helm with flags
# helm upgrade --install psql bitnami/postgresql \
# --namespace "torch-cloud" \
# --create-namespace \
# --set primary.persistence.storageClass=local-path \
# --set primary.persistence.enabled=true \
# --set primary.persistence.size=10Gi \
# --set volumePermissions.enabled=true

# Create a secret for the Docker registry
# kubectl create secret docker-registry ghcr-secret \
# --docker-server=ghcr.io \
# --docker-username=vekjja \
# --docker-password=${GITHUB_CR_PAT}

# Declare variables to be passed into your templates.
# helm upgrade --install torch-cloud . -f values.yaml
# helm upgrade --install torch-cloud helm/app -f helm/app/values.yaml \
# --namespace torch-cloud \
# --create-namespace

# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
replicaCount: 1
Expand All @@ -17,7 +35,8 @@ imagePullSecrets:
nameOverride: ""
fullnameOverride: ""

# This section builds out the srvice account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
# This section builds out the srvice account
# more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
serviceAccount:
create: true
automount: true
Expand All @@ -39,65 +58,14 @@ service:
type: ClusterIP
port: 3000

env:
- name: NODE_ENV
value: production
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: psql-db-url
key: url
- name: NEXTAUTH_URL
value: https://torch.cloud
- name: NEXTAUTH_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: nextauth-client-secret
key: client-secret
- name: GOOGLE_CLIENT_ID
valueFrom:
secretKeyRef:
name: google-client-id
key: client-id
- name: GOOGLE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: google-client-secret
key: client-secret
- name: LINKEDIN_CLIENT_ID
valueFrom:
secretKeyRef:
name: linkedin-client-id
key: client-id
- name: LINKEDIN_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: linkedin-client-secret
key: client-secret
- name: DISCORD_CLIENT_ID
valueFrom:
secretKeyRef:
name: discord-client-id
key: client-id
- name: DISCORD_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: discord-client-secret
key: client-secret
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: openai-api-key
key: api-key
- name: OPENAI_MODEL
value: "gpt-4o"
- name: OPENAI_MAX_COMPLETION_TOKENS
value: "198"
# Name of the secret containing all environment variables
# Create this secret with: kubectl create secret generic torch-cloud-env --from-env-file=.env
envSecretName: torch-cloud-env

ingress:
enabled: true
className: "nginx"
annotations: { cert-manager.io/cluster-issuer: "cloudlfare-letsencrypt-production" }
annotations: { cert-manager.io/cluster-issuer: "cloudflare-letsencrypt-production" }
hosts:
- host: torch.cloud
paths:
Expand Down
Loading