Skip to content

Commit

Permalink
PR comments + add curl to image
Browse files Browse the repository at this point in the history
add file
  • Loading branch information
Pascal-Delange committed Mar 8, 2024
1 parent 984717f commit 3a79799
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_and_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
push: true
target: app-builder
tags: ${{ env.IMAGE }}
file: ./Dockerfile
build-args: |
"SENTRY_RELEASE=${{ env.SENTRY_RELEASE }}"
secrets: |
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN pnpm deploy --filter=app-builder --prod /prod/app-builder
FROM base AS app-builder
ENV NODE_ENV=production
ENV PORT=8080
RUN apt-get update && apt-get install -y curl
COPY --from=build /prod/app-builder /prod/app-builder
WORKDIR /prod/app-builder
EXPOSE 8080
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile_local
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:20-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

FROM base AS build
RUN apt-get update
RUN apt-get -y install ca-certificates
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN pnpm install --frozen-lockfile
RUN pnpm --filter=app-builder run build
RUN pnpm deploy --filter=app-builder --prod /prod/app-builder

FROM base AS app-builder
ENV NODE_ENV=production
ENV PORT=8080
RUN apt-get update && apt-get install -y curl
COPY --from=build /prod/app-builder /prod/app-builder
WORKDIR /prod/app-builder
EXPOSE 8080
CMD [ "pnpm", "start"]
2 changes: 1 addition & 1 deletion packages/app-builder/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MARBLE_API_DOMAIN_SERVER=http://localhost:8080
MARBLE_APP_DOMAIN=http://localhost:3000

# coment out to use the real firebase
FIREBASE_AUTH_EMULATOR_HOST=http://localhost:9099
FIREBASE_AUTH_EMULATOR_HOST=localhost:9099

# if you make use of the auth emulator, you can enter dummy values
FIREBASE_API_KEY=dummy
Expand Down
6 changes: 1 addition & 5 deletions packages/app-builder/src/utils/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ export function getServerEnv<K extends keyof ServerEnvVarName>(
export function getClientEnvVars() {
return {
ENV: getServerEnv('ENV'),
FIREBASE_AUTH_EMULATOR_HOST: getServerEnv(
'FIREBASE_AUTH_EMULATOR_HOST',
)?.startsWith('http://')
? getServerEnv('FIREBASE_AUTH_EMULATOR_HOST')
: 'http://' + getServerEnv('FIREBASE_AUTH_EMULATOR_HOST'),
FIREBASE_AUTH_EMULATOR_HOST: getServerEnv('FIREBASE_AUTH_EMULATOR_HOST'),
FIREBASE_OPTIONS: {
apiKey: getServerEnv('FIREBASE_API_KEY'),
authDomain: getServerEnv('FIREBASE_AUTH_DOMAIN'),
Expand Down

0 comments on commit 3a79799

Please sign in to comment.