Docker qo'shildi
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20-alpine
|
||||
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
COPY --from=builder /app/package*.json ./
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
|
||||
EXPOSE 5263
|
||||
CMD ["npm", "start"]
|
||||
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
frontend:
|
||||
image: muhammadvadud/simple-travel-front-admin:latest
|
||||
build: .
|
||||
ports:
|
||||
- "5263:3000"
|
||||
deploy:
|
||||
replicas: 2
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
13
stack.yaml
Normal file
13
stack.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
simple-travel-frontend:
|
||||
image: muhammadvadud/simple-travel-front-admin:latest
|
||||
ports:
|
||||
- "5263:3000"
|
||||
env_file:
|
||||
- .env
|
||||
deploy:
|
||||
replicas: 2
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
Reference in New Issue
Block a user