sina_sajjadi 2 months ago
parent
commit
d1f08af7a8
  1. 8
      Dockerfile
  2. 2
      Jenkinsfile
  3. 42
      next.config.js
  4. 2
      runner.sh

8
Dockerfile

@ -7,17 +7,17 @@ WORKDIR /app
# Install dependencies # Install dependencies
COPY package*.json ./ COPY package*.json ./
RUN yarn install
#RUN npm install
# RUN yarn install
RUN npm install
# Copy project files # Copy project files
COPY . . COPY . .
# RUN npm run build
RUN yarn build RUN yarn build
# Expose port # Expose port
EXPOSE 3000
# EXPOSE 3000
CMD ["yarn", "start"] CMD ["yarn", "start"]
# Start the application in development mode # Start the application in development mode

2
Jenkinsfile

@ -4,7 +4,7 @@ pipeline {
develop_server_name = '' develop_server_name = ''
production_server_ip = "88.99.212.243" production_server_ip = "88.99.212.243"
production_server_name = "newhorizon_germany_001_server" production_server_name = "newhorizon_germany_001_server"
project_path = "/projects/aqila/aqila_frontend/"
project_path = "/projects/aqila/aqila_frontend"
version = "main" version = "main"
gitBranch = "origin/main" gitBranch = "origin/main"
} }

42
next.config.js

@ -1,6 +1,21 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
module.exports = {
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
ignoreBuildErrors: true,
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: { images: {
remotePatterns: [ remotePatterns: [
{ {
@ -35,15 +50,22 @@ const nextConfig = {
}, },
], ],
}, },
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
trailingSlash: true,
}; };
module.exports = nextConfig;
// const nextConfig = {
// reactStrictMode: false,
// ignoreBuildErrors: true,
// typescript: {
// ignoreBuildErrors: true,
// },
// eslint: {
// ignoreDuringBuilds: true,
// },
// trailingSlash: true,
// };
// module.exports = nextConfig;

2
runner.sh

@ -8,5 +8,5 @@ else
echo "Run Production docker" echo "Run Production docker"
git pull origin main git pull origin main
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.yml up -d --build
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose -f docker-compose.yml up -d --build --force-recreate
fi fi
Loading…
Cancel
Save