Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OPENCLIMATE_API_URL env var and use in API service #369

Merged
merged 1 commit into from
Mar 14, 2024
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
5 changes: 1 addition & 4 deletions app/src/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,7 @@ export const api = createApi({
export const openclimateAPI = createApi({
reducerPath: "openclimateapi",
baseQuery: fetchBaseQuery({
baseUrl:
process.env.NODE_ENV === "production"
? "https://app.openclimate.network"
: "https://openclimate.openearth.dev",
baseUrl: process.env.OPENCLIMATE_API_URL,
}),
endpoints: (builder) => ({
getOCCity: builder.query<any, string>({
Expand Down
72 changes: 37 additions & 35 deletions k8s/cc-web-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,40 @@ spec:
app: cc-web
spec:
containers:
- name: cc-web
image: ghcr.io/open-earth-foundation/citycatalyst:latest
# Set to Never for local
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: PORT
value: "3000"
- name: DATABASE_HOST
value: "cc-db"
- name: DATABASE_NAME
value: "citycatalyst"
- name: DATABASE_USER
value: "citycatalyst"
- name: DATABASE_PASSWORD
value: "development"
- name: NEXTAUTH_URL
value: "https://citycatalyst.openearth.dev"
- name: HOST
value: "https://citycatalyst.openearth.dev"
- name: SMTP_FROM_EMAIL
value: "[email protected]"
- name: SMTP_HOST
value: "email-smtp.us-east-1.amazonaws.com"
- name: SMTP_PORT
value: "587"
- name: GLOBAL_API_URL
value: "https://ccglobal.openearth.dev"
resources:
limits:
memory: "1024Mi"
cpu: "1000m"
- name: cc-web
image: ghcr.io/open-earth-foundation/citycatalyst:latest
# Set to Never for local
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: PORT
value: "3000"
- name: DATABASE_HOST
value: "cc-db"
- name: DATABASE_NAME
value: "citycatalyst"
- name: DATABASE_USER
value: "citycatalyst"
- name: DATABASE_PASSWORD
value: "development"
- name: NEXTAUTH_URL
value: "https://citycatalyst.openearth.dev"
- name: HOST
value: "https://citycatalyst.openearth.dev"
- name: SMTP_FROM_EMAIL
value: "[email protected]"
- name: SMTP_HOST
value: "email-smtp.us-east-1.amazonaws.com"
- name: SMTP_PORT
value: "587"
- name: GLOBAL_API_URL
value: "https://ccglobal.openearth.dev"
- name: OPENCLIMATE_API_URL
value: "https://openclimate.openearth.dev"
resources:
limits:
memory: "1024Mi"
cpu: "1000m"
Loading