Skip to content

Commit

Permalink
added .env creation for kubernetes
Browse files Browse the repository at this point in the history
  • Loading branch information
nheek committed Oct 12, 2024
1 parent d752297 commit 17fbc8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ jobs:
run: |
mkdir -p $HOME/.kube
echo "${{ secrets.DO_KUBECONFIG }}" | base64 --decode > $HOME/.kube/config
- name: Create .env file
run: |
echo "NEXT_PUBLIC_OPEN_AI_API_KEY"=${{ secrets.NEXT_PUBLIC_OPEN_AI_API_KEY }} > .env
- name: Create ConfigMap from .env file
run: |
kubectl create configmap app-config --from-env-file=.env --dry-run=client -o yaml | kubectl apply -f -
- name: Deploy to Kubernetes
run: |
Expand Down
3 changes: 3 additions & 0 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@ spec:
containers:
- name: motto
image: nheek/motto:latest
envFrom:
- configMapRef:
name: app-config
ports:
- containerPort: 3000

0 comments on commit 17fbc8e

Please sign in to comment.