Skip to content

Commit

Permalink
Tanfarming patch 1 (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanfarming authored Oct 7, 2022
1 parent ae8c280 commit ff88740
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 22 deletions.
Empty file added marketing/.dockerignore
Empty file.
7 changes: 0 additions & 7 deletions marketing/.env.development

This file was deleted.

7 changes: 0 additions & 7 deletions marketing/.env.production

This file was deleted.

2 changes: 1 addition & 1 deletion marketing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ WORKDIR "/app"
RUN chown nobody /app
COPY --from=builder --chown=nobody:root /client ./
USER nobody
CMD yarn run start
CMD ENV="prod" yarn run start
2 changes: 2 additions & 0 deletions marketing/docker_entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source env.production
echo FXA_SERVER
36 changes: 29 additions & 7 deletions marketing/next.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
/** @type {import('next').NextConfig} */

if (process.env.ENV == "prod"){
FXA_SERVER="TBD111"
AUTH_SERVER="TBD222"
HUB_ROOT_DOMAIN="TBD333"
DASH_ROOT_DOMAIN="TBD444"
FXA_PAYMENT_URL="TBD555"
PRODUCT_ID="TBD666"
PLAN_ID_EA="TBD777"
}else{
FXA_SERVER="accounts.firefox.com"
AUTH_SERVER="auth.myhubs.net"
HUB_ROOT_DOMAIN="dev.myhubs.net"
DASH_ROOT_DOMAIN="dashboard.dev.myhubs.net"
FXA_PAYMENT_URL="https://payments-stage.fxa.nonprod.cloudops.mozgcp.net"
PRODUCT_ID="prod_KPReWHqwGqZBzc"
PLAN_ID_EA="price_1Jkcl3Kb9q6OnNsLFbECmMtd"
}


const nextConfig = {
reactStrictMode: true,
swcMinify: true,
publicRuntimeConfig: {
AUTH_SERVER: process.env.AUTH_SERVER,
FXA_SERVER: process.env.FXA_SERVER,
HUB_ROOT_DOMAIN: process.env.HUB_ROOT_DOMAIN,
FXA_PAYMENT_URL: process.env.FXA_PAYMENT_URL,
DASH_ROOT_DOMAIN: process.env.DASH_ROOT_DOMAIN,
PRODUCT_ID: process.env.PRODUCT_ID,
PLAN_ID_EA: process.env.PLAN_ID_EA,
AUTH_SERVER: AUTH_SERVER,
FXA_SERVER: FXA_SERVER,
HUB_ROOT_DOMAIN: HUB_ROOT_DOMAIN,
FXA_PAYMENT_URL: FXA_PAYMENT_URL,
DASH_ROOT_DOMAIN: DASH_ROOT_DOMAIN,
PRODUCT_ID: PRODUCT_ID,
PLAN_ID_EA: PLAN_ID_EA,
},
};

console.log("nextConfig: ", nextConfig)

module.exports = nextConfig;

0 comments on commit ff88740

Please sign in to comment.