Skip to content

Commit

Permalink
configing for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Inverseit committed Oct 17, 2023
1 parent b0da06f commit 44ded40
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config_template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"url": "",
"secret": "c5502d62-84a5-41f1-87eb-ee33a76fb7bc",
"database": "redis",
"redis": {
"host": "",
"port": "",
"password": "",
"database": "0"
},
"port": "4567"
}
27 changes: 27 additions & 0 deletions create_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM node:lts

RUN mkdir -p /usr/src/app && \
chown -R node:node /usr/src/app
WORKDIR /usr/src/app

RUN apt-get update && apt-get install -y jq

ARG NODE_ENV
ENV NODE_ENV $NODE_ENV

COPY --chown=node:node install/package.json /usr/src/app/package.json

USER node

RUN npm install && \
npm cache clean --force

COPY --chown=node:node . /usr/src/app

ENV NODE_ENV=production \
daemon=false \
silent=false

EXPOSE 4567

CMD ./create_config.sh -n "${SETUP}" && ./nodebb setup || node ./nodebb build; node ./nodebb start

0 comments on commit 44ded40

Please sign in to comment.