Skip to content

Commit

Permalink
rename background to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparkallas authored Oct 26, 2023
1 parent 46dfff2 commit b343c25
Show file tree
Hide file tree
Showing 59 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
include:
- dockerfilePath: ./apps/background/
- dockerfilePath: ./apps/backend/
dockerImageSuffix: backend
- dockerfilePath: ./apps/frontend/
dockerImageSuffix: frontend
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions apps/background/Dockerfile → apps/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM node:alpine As development

RUN apk add --no-cache python3 py3-pip make g++

WORKDIR /usr/apps/background
WORKDIR /usr/apps/backend

COPY package.json ./
COPY pnpm-lock.yaml ./
Expand All @@ -22,7 +22,7 @@ RUN apk add --no-cache python3 py3-pip make g++
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}

WORKDIR /usr/apps/background
WORKDIR /usr/apps/backend

COPY package.json ./
COPY pnpm-lock.yaml ./
Expand All @@ -31,6 +31,6 @@ RUN npm install -g pnpm

RUN pnpm install --prod

COPY --from=development /usr/apps/background/dist ./dist
COPY --from=development /usr/apps/backend/dist ./dist

CMD ["node", "dist/main"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions apps/frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
NEXT_PUBLIC_WALLECT_CONNECT_PROJECT_ID=952483bf7a0f5ace4c40eb53967f1368
BACKGROUND_HOST=localhost
BACKGROUND_PORT=3001
BACKGROUND_API_KEY=my-secret-key
BACKEND_HOST=localhost
BACKEND_PORT=3001
BACKEND_API_KEY=my-secret-key
6 changes: 3 additions & 3 deletions apps/frontend/src/internalConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ type InternalConfig = {

const internalConfig: InternalConfig = {
getApiKey() {
const apiKey = ensureDefined(process.env.BACKGROUND_API_KEY, 'BACKGROUND_API_KEY');
const apiKey = ensureDefined(process.env.BACKEND_API_KEY, 'BACKEND_API_KEY');
return apiKey;
},
getBackendBaseUrl() {
const host = ensureDefined(process.env.BACKGROUND_HOST, 'BACKGROUND_HOST');
const port = Number(ensureDefined(process.env.BACKGROUND_PORT, 'BACKGROUND_PORT'));
const host = ensureDefined(process.env.BACKEND_HOST, 'BACKEND_HOST');
const port = Number(ensureDefined(process.env.BACKEND_PORT, 'BACKEND_PORT'));
return new URL(`http://${host}:${port}`);
},
};
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ services:
env_file:
- .env
environment:
- BACKGROUND_HOST=stripe-backend
- BACKGROUND_PORT=3001
- BACKEND_HOST=stripe-backend
- BACKEND_PORT=3001

volumes:
cache:
Expand Down
6 changes: 3 additions & 3 deletions k8s/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ spec:
imagePullPolicy: Never
name: stripe-frontend
env:
- name: BACKGROUND_API_KEY
- name: BACKEND_API_KEY
valueFrom:
secretKeyRef:
name: stripe-integration
key: API_KEY
- name: BACKGROUND_PORT
- name: BACKEND_PORT
value: "3001"
- name: BACKGROUND_HOST
- name: BACKEND_HOST
value: localhost
- name: NEXT_PUBLIC_WALLECT_CONNECT_PROJECT_ID
value: 952483bf7a0f5ace4c40eb53967f1368
Expand Down

0 comments on commit b343c25

Please sign in to comment.