Skip to content

Commit

Permalink
chore(docker): update docker compose (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaiJi authored Jan 22, 2024
1 parent 2282ca7 commit c239c2e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ XATA_BRANCH=main
XATA_FALLBACK_BRANCH=main

ENABLE_TRACK=false
STATIC_CDN_URL=static.furrycons.cn
SENTRY_AUTH_TOKEN=

NEXT_PUBLIC_REGION=GLOBAL
NEXT_PUBLIC_WEBSITE_URL=www.furryeventchina.com
SENTRY_AUTH_TOKEN=
NEXT_PUBLIC_STATIC_CDN_URL=static.furrycons.cn
NEXT_PUBLIC_SENTRY_DSN=
8 changes: 4 additions & 4 deletions .github/workflows/deploy-self-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
ENABLE_TRACK: ${{ vars.ENABLE_TRACK }}
NEXT_PUBLIC_REGION: ${{ vars.NEXT_PUBLIC_REGION }}
STATIC_CDN_URL: ${{vars.STATIC_CDN_URL}}
NEXT_PUBLIC_STATIC_CDN_URL: ${{vars.NEXT_PUBLIC_STATIC_CDN_URL}}
NEXT_PUBLIC_WEBSITE_URL: ${{vars.NEXT_PUBLIC_WEBSITE_URL}}
steps:
- name: Checkout repository
Expand All @@ -30,7 +30,7 @@ jobs:
echo XATA_FALLBACK_BRANCH="$XATA_FALLBACK_BRANCH" >> .env
echo SENTRY_AUTH_TOKEN="$SENTRY_AUTH_TOKEN" >> .env
echo ENABLE_TRACK="$ENABLE_TRACK" >> .env
echo STATIC_CDN_URL="$STATIC_CDN_URL" >>.env
echo NEXT_PUBLIC_STATIC_CDN_URL="$NEXT_PUBLIC_STATIC_CDN_URL" >>.env
echo NEXT_PUBLIC_WEBSITE_URL="$NEXT_PUBLIC_WEBSITE_URL" >>.env
- name: Login to ACR
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
ENABLE_TRACK: ${{ vars.ENABLE_TRACK }}
NEXT_PUBLIC_REGION: ${{ vars.NEXT_PUBLIC_REGION }}
NEXT_PUBLIC_SENTRY_DSN: ${{vars.NEXT_PUBLIC_SENTRY_DSN}}
STATIC_CDN_URL: ${{vars.STATIC_CDN_URL}}
NEXT_PUBLIC_STATIC_CDN_URL: ${{vars.NEXT_PUBLIC_STATIC_CDN_URL}}
NEXT_PUBLIC_WEBSITE_URL: ${{vars.NEXT_PUBLIC_WEBSITE_URL}}
steps:
- name: Checkout repository
Expand All @@ -74,7 +74,7 @@ jobs:
echo ENABLE_TRACK="$ENABLE_TRACK" >> .env
echo NEXT_PUBLIC_REGION="$NEXT_PUBLIC_REGION" >>.env
echo NEXT_PUBLIC_SENTRY_DSN="$NEXT_PUBLIC_SENTRY_DSN" >>.env
echo STATIC_CDN_URL="$STATIC_CDN_URL" >>.env
echo NEXT_PUBLIC_STATIC_CDN_URL="$NEXT_PUBLIC_STATIC_CDN_URL" >>.env
echo NEXT_PUBLIC_WEBSITE_URL="$NEXT_PUBLIC_WEBSITE_URL" >>.env
- name: Login to ACR
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ services:
restart: always
environment:
- NODE_ENV=production
- SENTRY_AUTH_TOKEN=$GLOBAL_SENTRY_TOKEN
- NEXT_PUBLIC_REGION=GLOBAL
- NEXT_PUBLIC_WEBSITE_URL=www.furryeventchina.com
- NEXT_PUBLIC_STATIC_CDN_URL=static.furrycons.cn
env_file:
- stack.env
networks:
Expand All @@ -15,6 +19,11 @@ services:
restart: always
environment:
- NODE_ENV=production
- SENTRY_AUTH_TOKEN=$CN_SENTRY_TOKEN
- NEXT_PUBLIC_REGION=CN
- NEXT_PUBLIC_WEBSITE_URL=www.furrycons.cn
- NEXT_PUBLIC_STATIC_CDN_URL=static.furrycons.cn
- NEXT_PUBLIC_SENTRY_DSN=$CN_SENTRY_DSN
env_file:
- stack.env
networks:
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({
});

const isProd = process.env.NODE_ENV === "production";
const STATIC_CDN_URL = process.env.STATIC_CDN_URL;
const STATIC_CDN_URL = process.env.NEXT_PUBLIC_STATIC_CDN_URL;

const gitRevisionPlugin = new GitRevisionPlugin();

Expand Down

0 comments on commit c239c2e

Please sign in to comment.