Skip to content

Commit

Permalink
Gateway frontend Dockerfile added
Browse files Browse the repository at this point in the history
  • Loading branch information
zkokelj committed May 13, 2024
1 parent 6c12e16 commit 433df82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
18 changes: 18 additions & 0 deletions tools/walletextension/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Use an official Node.js 22 as a parent image
FROM node:22-alpine

WORKDIR /usr/src/app

# ARG for build-time variable (GATEWAY_API_URL)
ARG GATEWAY_API_URL

# ENV for URL to be used in the app
ENV NEXT_PUBLIC_API_GATEWAY_URL=${GATEWAY_API_URL}

# Copy package.json and package-lock.json (or yarn.lock) into the container
COPY package*.json ./

RUN npm install
COPY . .
RUN npm run build
CMD ["npm", "start"]
5 changes: 0 additions & 5 deletions tools/walletextension/frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
output: "export",
// distDir should be "../api/static" in production but .next in development
distDir: process.env.NODE_ENV === "development" ? ".next" : "../api/static",
images: {
unoptimized: true,
},
// base path for static files should be "" in development but "/static" in production
basePath: process.env.NODE_ENV === "development" ? "" : "/static",
};

module.exports = nextConfig;

0 comments on commit 433df82

Please sign in to comment.