Skip to content

Commit dd8c0a1

Browse files
committed
Rename URL env
1 parent 99c33d0 commit dd8c0a1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ARG GIT_HASH
2424

2525
ENV NODE_ENV=production \
2626
BUILD_ID=${GIT_HASH} \
27-
NEXT_PUBLIC_PUBLIC_URL=https://mydomain.com \
27+
NEXT_PUBLIC_URL=https://mydomain.com \
2828
NEXT_PUBLIC_GTAG_ID=GTM-MXDVTH6
2929

3030
# Add all files

components/meta/meta.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { TMPropsMeta } from './metaType';
55
const Meta = (props: TMPropsMeta) => {
66
const authorName = 'junekimdev';
77
const siteName = "another junekimdev's website";
8-
const homeUrl = process.env.NEXT_PUBLIC_PUBLIC_URL ?? 'localhost:3000';
8+
const homeUrl = process.env.NEXT_PUBLIC_URL ?? 'localhost:3000';
99
const {
1010
image = `${homeUrl}/assets/images/LogoPlace_Extended_1200x627.png`,
1111
imageWidth = '1200',

next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
// @see https://nextjs.org/docs/api-reference/next.config.js/environment-variables
33
// This sets environment variable for SSR
44
env: {
5-
NEXT_PUBLIC_PUBLIC_URL: process.env.NEXT_PUBLIC_PUBLIC_URL,
5+
NEXT_PUBLIC_URL: process.env.NEXT_PUBLIC_URL,
66
//NEXT_PUBLIC_CMS_URL: process.env.NEXT_PUBLIC_CMS_URL,
77
//NEXT_PUBLIC_GTAG_ID: process.env.NEXT_PUBLIC_GTAG_ID,
88
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL,

pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import MainFrame from '../components/mainFrame';
44
import Meta from '../components/meta';
55

66
const Page = () => {
7-
const publicUrl = process.env.PUBLIC_URL || 'localhost:3000';
7+
const publicUrl = process.env.NEXT_PUBLIC_URL ?? 'localhost:3000';
88

99
useEffect(() => {
1010
window.scrollTo(0, 0);

0 commit comments

Comments
 (0)