mirror of
https://github.com/smolgrrr/TAO.git
synced 2024-09-20 01:11:25 +00:00
commit
f7f4fd1278
8
client/.dockerignore
Normal file
8
client/.dockerignore
Normal file
@ -0,0 +1,8 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
node_modules
|
||||
npm-debug.log
|
||||
README.md
|
||||
.next
|
||||
.git
|
||||
build
|
1
client/.gitignore
vendored
1
client/.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
package-lock.json
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
21
client/Dockerfile
Normal file
21
client/Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
# Stage 1: Building the React application
|
||||
FROM node:18-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||
RUN \
|
||||
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
||||
elif [ -f package-lock.json ]; then npm ci; \
|
||||
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
|
||||
else echo "Lockfile not found." && exit 1; \
|
||||
fi
|
||||
COPY . .
|
||||
RUN yarn build # or `npm run build` if using npm
|
||||
|
||||
# Stage 2: Setting up Nginx to serve the React application
|
||||
FROM nginx:alpine AS production
|
||||
# Copy built assets from 'build' stage
|
||||
COPY --from=build /app/build /usr/share/nginx/html
|
||||
# Optional: If you have a custom nginx.conf, you can copy it to the container
|
||||
# COPY nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
@ -1,27 +1,48 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext",
|
||||
"webworker"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
"jsx": "preserve",
|
||||
"incremental": true
|
||||
},
|
||||
"include": [
|
||||
"src"
|
||||
]
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
// {
|
||||
// "compilerOptions": {
|
||||
// "target": "es5",
|
||||
// "lib": [
|
||||
// "dom",
|
||||
// "dom.iterable",
|
||||
// "esnext",
|
||||
// "webworker"
|
||||
// ],
|
||||
// "allowJs": true,
|
||||
// "skipLibCheck": true,
|
||||
// "esModuleInterop": true,
|
||||
// "allowSyntheticDefaultImports": true,
|
||||
// "strict": true,
|
||||
// "forceConsistentCasingInFileNames": true,
|
||||
// "noFallthroughCasesInSwitch": true,
|
||||
// "module": "esnext",
|
||||
// "moduleResolution": "node",
|
||||
// "resolveJsonModule": true,
|
||||
// "isolatedModules": true,
|
||||
// "noEmit": true,
|
||||
// "jsx": "react-jsx"
|
||||
// },
|
||||
// "include": [
|
||||
// "src"
|
||||
// ]
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user