Skip to content

Commit

Permalink
Merge pull request #369 from Open-Earth-Foundation/fix/use-open-earth…
Browse files Browse the repository at this point in the history
…-dev

Add OPENCLIMATE_API_URL env var and use in API service
  • Loading branch information
lemilonkh authored Mar 14, 2024
2 parents 5fb2313 + 96d9b0d commit 3655ef7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 39 deletions.
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"

0 comments on commit 3655ef7

Please sign in to comment.