fix: deployment
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# To use this Dockerfile, you have to set `output: 'standalone'` in your next.config.mjs file.
|
# Dockerfile
|
||||||
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
|
||||||
|
|
||||||
FROM node:22.12.0-alpine AS base
|
FROM node:18-alpine AS base
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
@@ -48,7 +48,6 @@ ENV NODE_ENV production
|
|||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
|
|
||||||
# Remove this line if you do not have this folder
|
|
||||||
COPY --from=builder /app/public ./public
|
COPY --from=builder /app/public ./public
|
||||||
|
|
||||||
# Set the correct permission for prerender cache
|
# Set the correct permission for prerender cache
|
||||||
|
|||||||
@@ -2,42 +2,11 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
payload:
|
payload:
|
||||||
image: node:18-alpine
|
image: payload
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- '3000:3000'
|
- "3000:3000"
|
||||||
volumes:
|
environment:
|
||||||
- .:/home/node/app
|
- NODE_ENV=production
|
||||||
- node_modules:/home/node/app/node_modules
|
|
||||||
working_dir: /home/node/app/
|
|
||||||
command: sh -c "corepack enable && corepack prepare pnpm@latest --activate && pnpm install && pnpm dev"
|
|
||||||
depends_on:
|
|
||||||
- mongo
|
|
||||||
# - postgres
|
|
||||||
env_file:
|
|
||||||
- .env
|
|
||||||
|
|
||||||
# Ensure your DATABASE_URI uses 'mongo' as the hostname ie. mongodb://mongo/my-db-name
|
|
||||||
mongo:
|
|
||||||
image: mongo:latest
|
|
||||||
ports:
|
|
||||||
- '27017:27017'
|
|
||||||
command:
|
|
||||||
- --storageEngine=wiredTiger
|
|
||||||
volumes:
|
|
||||||
- data:/data/db
|
|
||||||
logging:
|
|
||||||
driver: none
|
|
||||||
|
|
||||||
# Uncomment the following to use postgres
|
|
||||||
# postgres:
|
|
||||||
# restart: always
|
|
||||||
# image: postgres:latest
|
|
||||||
# volumes:
|
|
||||||
# - pgdata:/var/lib/postgresql/data
|
|
||||||
# ports:
|
|
||||||
# - "5432:5432"
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
data:
|
|
||||||
# pgdata:
|
|
||||||
node_modules:
|
|
||||||
|
|||||||
@@ -25,7 +25,9 @@
|
|||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
"csv-parser": "^3.2.0",
|
||||||
"graphql": "^16.8.1",
|
"graphql": "^16.8.1",
|
||||||
|
"libsql": "^0.5.3",
|
||||||
"lucide-react": "^0.484.0",
|
"lucide-react": "^0.484.0",
|
||||||
"next": "15.2.3",
|
"next": "15.2.3",
|
||||||
"next-auth": "5.0.0-beta.25",
|
"next-auth": "5.0.0-beta.25",
|
||||||
@@ -50,12 +52,12 @@
|
|||||||
"typescript": "5.7.3"
|
"typescript": "5.7.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.20.2 || >=20.9.0",
|
"node": "^18.20.2 || >=20.9.0"
|
||||||
"pnpm": "^9"
|
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"sharp"
|
"sharp"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user