diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..0519ecba6e --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/fishing-map/Dockerfile b/apps/fishing-map/Dockerfile index 8365f127ba..b3abbdb58a 100644 --- a/apps/fishing-map/Dockerfile +++ b/apps/fishing-map/Dockerfile @@ -7,7 +7,16 @@ FROM node:21-alpine AS production WORKDIR /app ARG APP_NAME=fishing-map +ARG NEXT_MAP_ERRORS_SPREADSHEET_ID +ARG NEXT_FEEDBACK_SPREADSHEET_ID +ARG NEXT_SPREADSHEET_CLIENT_EMAIL +ARG NEXT_SPREADSHEET_PRIVATE_KEY + ENV APP_NAME $APP_NAME +ENV NEXT_MAP_ERRORS_SPREADSHEET_ID=${NEXT_MAP_ERRORS_SPREADSHEET_ID} +ENV NEXT_FEEDBACK_SPREADSHEET_ID=${NEXT_FEEDBACK_SPREADSHEET_ID} +ENV NEXT_SPREADSHEET_CLIENT_EMAIL=${NEXT_SPREADSHEET_CLIENT_EMAIL} +ENV NEXT_SPREADSHEET_PRIVATE_KEY=${NEXT_SPREADSHEET_PRIVATE_KEY} ENV NODE_ENV production # Uncomment the following line in case you want to disable telemetry during runtime. diff --git a/apps/fishing-map/cloudbuild.yaml b/apps/fishing-map/cloudbuild.yaml index 833dfe8433..bcea57f34b 100644 --- a/apps/fishing-map/cloudbuild.yaml +++ b/apps/fishing-map/cloudbuild.yaml @@ -53,11 +53,6 @@ steps: - 'NX_CLOUD_AUTH_TOKEN=$_NX_CLOUD_AUTH_TOKEN' - 'NEXT_PUBLIC_API_GATEWAY=$_NEXT_PUBLIC_API_GATEWAY' - 'NEXT_PUBLIC_API_VERSION=$_NEXT_PUBLIC_API_VERSION' - - 'NEXT_PUBLIC_CARRIER_PORTAL_URL=$_NEXT_PUBLIC_CARRIER_PORTAL_URL' - - 'NEXT_MAP_ERRORS_SPREADSHEET_ID=$_NEXT_MAP_ERRORS_SPREADSHEET_ID' - - 'NEXT_FEEDBACK_SPREADSHEET_ID=$_NEXT_FEEDBACK_SPREADSHEET_ID' - - 'NEXT_SPREADSHEET_CLIENT_EMAIL=$_NEXT_SPREADSHEET_CLIENT_EMAIL' - - 'NEXT_SPREADSHEET_PRIVATE_KEY=$_NEXT_SPREADSHEET_PRIVATE_KEY' - 'NEXT_PUBLIC_GOOGLE_MEASUREMENT_ID=$_NEXT_PUBLIC_GOOGLE_MEASUREMENT_ID' - 'NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID=$_NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID' - 'NEXT_PUBLIC_LATEST_CARRIER_DATASET_ID=$_NEXT_PUBLIC_LATEST_CARRIER_DATASET_ID' @@ -73,6 +68,7 @@ steps: env: - 'REF_NAME=$REF_NAME' - 'SHORT_SHA=$SHORT_SHA' + - 'NEXT_PUBLIC_CARRIER_PORTAL_URL=$_NEXT_PUBLIC_CARRIER_PORTAL_URL' script: | image_version=`echo $REF_NAME | grep -Eo "(develop)" || echo $REF_NAME | grep -Eo "fishing-map@([0-9].*)" | grep -Eo "([0-9].*)" || echo $SHORT_SHA` /kaniko/executor \ @@ -82,6 +78,14 @@ steps: --cache=true \ --build-arg \ APP_NAME=fishing-map \ + --build-arg \ + NEXT_MAP_ERRORS_SPREADSHEET_ID=${_NEXT_MAP_ERRORS_SPREADSHEET_ID} \ + --build-arg \ + NEXT_FEEDBACK_SPREADSHEET_ID=${_NEXT_FEEDBACK_SPREADSHEET_ID} \ + --build-arg \ + NEXT_SPREADSHEET_CLIENT_EMAIL=${_NEXT_SPREADSHEET_CLIENT_EMAIL} \ + --build-arg \ + NEXT_SPREADSHEET_PRIVATE_KEY=${_NEXT_SPREADSHEET_PRIVATE_KEY} \ --target \ production \ -f \ @@ -97,6 +101,7 @@ steps: env: - '_RUN_SERVICE_NAME=$_RUN_SERVICE_NAME' - '_NEXT_PUBLIC_WORKSPACE_ENV=$_NEXT_PUBLIC_WORKSPACE_ENV' + - 'NEXT_PUBLIC_CARRIER_PORTAL_URL=$_NEXT_PUBLIC_CARRIER_PORTAL_URL' args: - '-eEuo' - 'pipefail' @@ -119,6 +124,14 @@ steps: BASIC_AUTH_USER=$_BASIC_AUTH_USER \ --set-env-vars \ BASIC_AUTH_PASS=$_BASIC_AUTH_PASS \ + --set-env-vars \ + NEXT_MAP_ERRORS_SPREADSHEET_ID=${_NEXT_MAP_ERRORS_SPREADSHEET_ID} \ + --set-env-vars \ + NEXT_FEEDBACK_SPREADSHEET_ID=${_NEXT_FEEDBACK_SPREADSHEET_ID} \ + --set-env-vars \ + NEXT_SPREADSHEET_CLIENT_EMAIL=${_NEXT_SPREADSHEET_CLIENT_EMAIL} \ + --set-env-vars \ + NEXT_SPREADSHEET_PRIVATE_KEY=${_NEXT_SPREADSHEET_PRIVATE_KEY} \ --allow-unauthenticated workspace_env=${_NEXT_PUBLIC_WORKSPACE_ENV:-'development'} echo "https://globalfishingwatch.org/map" > app_url diff --git a/nx.json b/nx.json index dc44652df7..7a32b01d0c 100644 --- a/nx.json +++ b/nx.json @@ -7,15 +7,12 @@ "echo $NEXT_PUBLIC_URL", "echo $NEXT_PUBLIC_API_GATEWAY", "echo $NEXT_PUBLIC_WORKSPACE_ENV", + "echo $NEXT_PUBLIC_REPORT_DAYS_LIMIT", "echo $NEXT_PUBLIC_GOOGLE_MEASUREMENT_ID", "echo $NEXT_PUBLIC_GOOGLE_TAG_MANAGER_KEY", "echo $NEXT_PUBLIC_GOOGLE_ANALYTICS_TEST_MODE", "echo $NEXT_PUBLIC_CARRIER_PORTAL_URL", - "echo $NEXT_PUBLIC_LATEST_CARRIER_DATASET_ID", - "echo $NEXT_MAP_ERRORS_SPREADSHEET_ID", - "echo $NEXT_FEEDBACK_SPREADSHEET_ID", - "echo $NEXT_SPREADSHEET_CLIENT_EMAIL", - "echo $NEXT_SPREADSHEET_PRIVATE_KEY" + "echo $NEXT_PUBLIC_LATEST_CARRIER_DATASET_ID" ], "canTrackAnalytics": false, "showUsageWarnings": true @@ -61,6 +58,11 @@ "dependsOn": ["^build"], "outputs": ["{projectRoot}/dist"], "cache": true + }, + "dist": { + "dependsOn": ["^dist"], + "outputs": ["{projectRoot}/dist"], + "cache": true } }, "generators": {