remove files
This commit is contained in:
parent
18553ea93a
commit
8b84baf6b5
|
@ -1,33 +0,0 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
next-app:
|
||||
container_name: next-app
|
||||
build:
|
||||
context: ./next-app
|
||||
dockerfile: dev.Dockerfile
|
||||
|
||||
# Set environment variables directly in the docker-compose file
|
||||
environment:
|
||||
ENV_VARIABLE: ${ENV_VARIABLE}
|
||||
NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
|
||||
|
||||
# Set environment variables based on the .env file
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- ./next-app/src:/app/src
|
||||
- ./next-app/public:/app/public
|
||||
restart: always
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
- my_network
|
||||
|
||||
# Add more containers below (nginx, postgres, etc.)
|
||||
|
||||
# Define a network, which allows containers to communicate
|
||||
# with each other, by using their container name as a hostname
|
||||
networks:
|
||||
my_network:
|
||||
external: true
|
|
@ -1,24 +0,0 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
next-app:
|
||||
container_name: next-app
|
||||
build:
|
||||
context: ./next-app
|
||||
dockerfile: prod-without-multistage.Dockerfile
|
||||
args:
|
||||
ENV_VARIABLE: ${ENV_VARIABLE}
|
||||
NEXT_PUBLIC_ENV_VARIABLE: ${NEXT_PUBLIC_ENV_VARIABLE}
|
||||
restart: always
|
||||
ports:
|
||||
- 3000:3000
|
||||
networks:
|
||||
- my_network
|
||||
|
||||
# Add more containers below (nginx, postgres, etc.)
|
||||
|
||||
# Define a network, which allows containers to communicate
|
||||
# with each other, by using their container name as a hostname
|
||||
networks:
|
||||
my_network:
|
||||
external: true
|
|
@ -1,32 +0,0 @@
|
|||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies based on the preferred package manager
|
||||
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 corepack enable pnpm && pnpm i; \
|
||||
# Allow install without lockfile, so example works even without Node.js installed locally
|
||||
else echo "Warning: Lockfile not found. It is recommended to commit lockfiles to version control." && yarn install; \
|
||||
fi
|
||||
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
COPY next.config.js .
|
||||
COPY tsconfig.json .
|
||||
|
||||
# Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
|
||||
# Uncomment the following line to disable telemetry at run time
|
||||
# ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
# Note: Don't expose ports here, Compose will handle that for us
|
||||
|
||||
# Start Next.js in development mode based on the preferred package manager
|
||||
CMD \
|
||||
if [ -f yarn.lock ]; then yarn dev; \
|
||||
elif [ -f package-lock.json ]; then npm run dev; \
|
||||
elif [ -f pnpm-lock.yaml ]; then pnpm dev; \
|
||||
else npm run dev; \
|
||||
fi
|
|
@ -1,48 +0,0 @@
|
|||
FROM node:18-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies based on the preferred package manager
|
||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||
# Omit --production flag for TypeScript devDependencies
|
||||
RUN \
|
||||
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
||||
elif [ -f package-lock.json ]; then npm ci; \
|
||||
elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i; \
|
||||
# Allow install without lockfile, so example works even without Node.js installed locally
|
||||
else echo "Warning: Lockfile not found. It is recommended to commit lockfiles to version control." && yarn install; \
|
||||
fi
|
||||
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
COPY next.config.js .
|
||||
COPY tsconfig.json .
|
||||
|
||||
# Environment variables must be present at build time
|
||||
# https://github.com/vercel/next.js/discussions/14030
|
||||
ARG ENV_VARIABLE
|
||||
ENV ENV_VARIABLE=${ENV_VARIABLE}
|
||||
ARG NEXT_PUBLIC_ENV_VARIABLE
|
||||
ENV NEXT_PUBLIC_ENV_VARIABLE=${NEXT_PUBLIC_ENV_VARIABLE}
|
||||
|
||||
# Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry
|
||||
# Uncomment the following line to disable telemetry at build time
|
||||
# ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
# Note: Don't expose ports here, Compose will handle that for us
|
||||
|
||||
# Build Next.js based on the preferred package manager
|
||||
RUN \
|
||||
if [ -f yarn.lock ]; then yarn build; \
|
||||
elif [ -f package-lock.json ]; then npm run build; \
|
||||
elif [ -f pnpm-lock.yaml ]; then pnpm build; \
|
||||
else npm run build; \
|
||||
fi
|
||||
|
||||
# Start Next.js based on the preferred package manager
|
||||
CMD \
|
||||
if [ -f yarn.lock ]; then yarn start; \
|
||||
elif [ -f package-lock.json ]; then npm run start; \
|
||||
elif [ -f pnpm-lock.yaml ]; then pnpm start; \
|
||||
else npm run start; \
|
||||
fi
|
Loading…
Reference in New Issue