Skip to content

Commit

Permalink
Update k8s YAMLs and remove console stmt
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadhonrao committed Oct 26, 2024
1 parent 6d1fe0c commit bbf0484
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 26 deletions.
16 changes: 0 additions & 16 deletions deploy/docker/docker-compose-mongo.yml

This file was deleted.

5 changes: 4 additions & 1 deletion deploy/k8s/emptydir-volume/webapp/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ metadata:
name: devcamper-webapp-configmap
namespace: devcamper-namespace
data:
react_app_devcamper_base_api_uri: 'http://devcamper.webapi/api/v1'
config.json: |
{
"react_app_devcamper_base_api_uri": "http://devcamper.webapi/api/v1"
}
14 changes: 8 additions & 6 deletions deploy/k8s/emptydir-volume/webapp/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@ spec:
image: prasadhonrao/devcamper-webapp:latest
ports:
- containerPort: 3000
env:
- name: REACT_APP_DEVCAMPER_BASE_API_URI
valueFrom:
configMapKeyRef:
name: devcamper-webapp-configmap
key: react_app_devcamper_base_api_uri
volumeMounts:
- name: config-volume
mountPath: /app/build/config/config.json
subPath: config.json
resources:
limits:
memory: '2Gi'
cpu: '2'
requests:
memory: '1Gi'
cpu: '1'
volumes:
- name: config-volume
configMap:
name: devcamper-webapp-configmap
3 changes: 0 additions & 3 deletions src/webapp/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import { AuthProvider } from './contexts/AuthContext';
import Layout from './components/Layout';

function App() {
// Log environment variables
console.log('REACT_APP_DEVCAMPER_BASE_API_URI:', process.env.REACT_APP_DEVCAMPER_BASE_API_URI);

return (
<AuthProvider>
<BrowserRouter>
Expand Down

0 comments on commit bbf0484

Please sign in to comment.