-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dockerfile and environments for kuzzlerc and kourou.env
- Loading branch information
Showing
5 changed files
with
40 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
# Builder stage | ||
FROM kuzzleio/kuzzle-runner:18 AS builder | ||
|
||
ADD . /var/app | ||
|
||
WORKDIR /var/app | ||
|
||
RUN npm ci | ||
RUN npm run build | ||
|
||
FROM kuzzleio/kuzzle-runner:18 AS prepare | ||
COPY . . | ||
|
||
WORKDIR /var/app | ||
ENV NODE_ENV=production | ||
|
||
COPY --from=builder /var/app/package*.json /var/app/.npmrc* /var/app/dist ./ | ||
RUN npm install --production | ||
RUN npm install | ||
RUN npm run build | ||
RUN npm prune --production | ||
|
||
# Final image | ||
FROM node:18-stretch-slim AS production | ||
FROM node:18-bullseye-slim | ||
|
||
ARG KUZZLE_ENV="local" | ||
ARG KUZZLE_VAULT_KEY="" | ||
|
||
ARG KUZZLE_VAULT_KEY | ||
ENV KUZZLE_VAULT_KEY=$KUZZLE_VAULT_KEY | ||
# Uncomment if you want to use the Kuzzle Vault | ||
# See https://docs.kuzzle.io/core/2/guides/advanced/secrets-vault | ||
# ENV KUZZLE_VAULT_KEY=$KUZZLE_VAULT_KEY | ||
# ENV KUZZLE_SECRETS_FILE="/var/app/secrets.enc.json" | ||
|
||
ENV NODE_ENV=production | ||
|
||
WORKDIR /var/app | ||
COPY --from=builder /var/app/dist /var/app | ||
COPY --from=builder /var/app/node_modules /var/app/node_modules | ||
COPY --from=builder /var/app/package.json /var/app/package.json | ||
COPY --from=builder /var/app/package-lock.json /var/app/package-lock.json | ||
COPY --from=builder /var/app/environments/${KUZZLE_ENV}/kuzzlerc /var/app/.kuzzlerc | ||
|
||
COPY --from=prepare /var/app/ ./ | ||
WORKDIR /var/app | ||
|
||
CMD [ "node", "app.js" ] | ||
CMD [ "node", "app.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
unset KUZZLE_HOST KUZZLE_PORT KUZZLE_USERNAME KUZZLE_PASSWORD | ||
|
||
export KUZZLE_HOST=localhost | ||
export KUZZLE_PORT=7512 | ||
export KUZZLE_USERNAME=admin | ||
export KUZZLE_PASSWORD=admin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"application": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
unset KUZZLE_HOST KUZZLE_PORT KUZZLE_USERNAME KUZZLE_PASSWORD | ||
|
||
export KUZZLE_HOST=localhost | ||
export KUZZLE_PORT=7512 | ||
export KUZZLE_USERNAME=admin | ||
export KUZZLE_PASSWORD=admin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"application": {} | ||
} |