diff --git a/apps/api-gateway/Dockerfile b/apps/api-gateway/Dockerfile index 7f2c2d66..0c664f98 100644 --- a/apps/api-gateway/Dockerfile +++ b/apps/api-gateway/Dockerfile @@ -1,4 +1,4 @@ -FROM linkerry/base:latest AS builder +FROM registry.digitalocean.com/linkerry/base:latest AS builder ARG NODE_ENV ARG BUILD_FLAG diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index a19f6a9c..c35953e7 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,13 +1,16 @@ -# FROM linkerry/base:latest AS builder FROM registry.digitalocean.com/linkerry/base:latest AS builder ARG NODE_ENV -ARG BUILD_FLAG ENV NEXT_TELEMETRY_DISABLED=true ENV NEXT_PUBLIC_API_HOST=$NEXT_PUBLIC_API_HOST +RUN echo "API Host: $NEXT_PUBLIC_API_HOST" WORKDIR /app/builder +# Copy the correct environment file based on the build argument `ENVIRONMENT` +# COPY .env.${ENVIRONMENT} ./.env +COPY /app/builder/apps/web/.env.prod /app/builder/apps/web/.env + RUN npx nx run web:build || echo "nx run web:build failed" FROM node:lts-alpine AS runner diff --git a/docs/devops/ci.md b/docs/devops/ci.md index dd3dcc6f..b96e6cbf 100644 --- a/docs/devops/ci.md +++ b/docs/devops/ci.md @@ -1,5 +1,5 @@ # build base docker image -`docker build . -t linkerry/base:latest` +`docker build . -t registry.digitalocean.com/linkerry/base:latest` # build and run server docker compose `docker compose -f ./apps/api-gateway/docker-compose.local.yml up -d` diff --git a/package.json b/package.json index 0572c4f4..1de8b555 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@linkerry/source", "version": "0.0.0", - "packageManager": "pnpm@^8.0.0", + "packageManager": "pnpm@8.15.2", "license": "MIT", "private": true, "author": { @@ -21,8 +21,8 @@ "registry-and-publish": "sleep 3 && make publish-connectors & npx nx local-registry", "ngrok": "ngrok http --domain=fairly-winning-chamois.ngrok-free.app 3001", "stripe": "stripe listen --forward-to localhost:3001/api/v1/stripe/webhook", - "docker-base-linux": "docker build . -t linkerry/base:latest --platform=linux/amd64", - "docker-base": "docker build . -t linkerry/base:latest", + "docker-base-linux": "docker build . -t registry.digitalocean.com/linkerry/base:latest --platform=linux/amd64", + "docker-base": "docker build . -t registry.digitalocean.com/linkerry/base:latest", "docker-api": "docker compose -f ./apps/api-gateway/docker-compose.local.yml up -d", "docker-web": "docker compose -f ./apps/web/docker-compose.local.yml up -d" },