mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
chore: fix dockerfile
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# node ace generate:key
|
||||
APP_KEY=UfdS996001I_koCN1OiZiSh-DJZTyvGc
|
||||
TZ=UTC
|
||||
PORT=3333
|
||||
HOST=localhost
|
||||
LOG_LEVEL=info
|
||||
APP_KEY=sLoJth45JD1vcS8n92Y2JUd8w3OL4HQb
|
||||
NODE_ENV=development
|
||||
SESSION_DRIVER=cookie
|
||||
DB_HOST=127.0.0.1
|
||||
|
||||
26
Dockerfile
26
Dockerfile
@@ -1,27 +1,43 @@
|
||||
# Source : https://github.com/adonisjs-community/adonis-packages/blob/main/Dockerfile
|
||||
|
||||
FROM node:20-alpine3.18 as base
|
||||
FROM node:20-alpine3.18 AS base
|
||||
|
||||
RUN apk --no-cache add curl
|
||||
RUN corepack enable
|
||||
|
||||
# All deps stage
|
||||
FROM base as deps
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
ADD package.json package-lock.json ./
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Production only deps stage
|
||||
FROM base as production-deps
|
||||
FROM base AS production-deps
|
||||
WORKDIR /app
|
||||
ADD package.json package-lock.json ./
|
||||
RUN npm install --omit="dev" --ignore-scripts
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Build stage
|
||||
FROM base as build
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules /app/node_modules
|
||||
ADD . .
|
||||
|
||||
ENV PORT=3333
|
||||
ENV HOST=localhost
|
||||
ENV LOG_LEVEL=info
|
||||
ENV APP_KEY=sLoJth45JD1vcS8n92Y2JUd8w3OL4HQb
|
||||
ENV NODE_ENV=production
|
||||
ENV SESSION_DRIVER=cookie
|
||||
ENV DB_HOST=127.0.0.1
|
||||
ENV DB_PORT=5432
|
||||
ENV DB_USER=db_user
|
||||
ENV DB_PASSWORD=db_password
|
||||
ENV DB_DATABASE=db_db
|
||||
ENV GOOGLE_CLIENT_ID=client_id
|
||||
ENV GOOGLE_CLIENT_SECRET=client_secret
|
||||
ENV GOOGLE_CLIENT_CALLBACK_URL=http://localhost:3333/auth/callback
|
||||
|
||||
RUN node ace izzy:routes
|
||||
RUN node ace build
|
||||
|
||||
|
||||
19
package-lock.json
generated
19
package-lock.json
generated
@@ -2,6 +2,7 @@
|
||||
"name": "my-links",
|
||||
"version": "2.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "my-links",
|
||||
@@ -3539,15 +3540,6 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__generator": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/babel__template": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/babel__traverse": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/chai": {
|
||||
"version": "4.3.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz",
|
||||
@@ -3559,9 +3551,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
|
||||
"integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA=="
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-report": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||
@@ -3593,7 +3582,6 @@
|
||||
"integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/prop-types": {},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz",
|
||||
@@ -3650,9 +3638,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.10.tgz",
|
||||
"integrity": "sha512-e2PNXoXLr6Z+dbfx5zSh9TRlXJrELycxiaXznp4S5+D2M3b9bqJEitNHA5923jhnB2zzFiZHa2f0SI1HoIahpg=="
|
||||
},
|
||||
"node_modules/@types/yargs-parser": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "7.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.11.0.tgz",
|
||||
@@ -14360,4 +14345,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user