-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into update-email
- Loading branch information
Showing
11 changed files
with
8,162 additions
and
2,356 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
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
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 |
---|---|---|
|
@@ -8,3 +8,5 @@ ignore: | | |
rules: | ||
document-start: disable | ||
line-length: disable | ||
truthy: disable | ||
comments-indentation: disable |
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
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
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,32 +1,28 @@ | ||
# FIXME use alpine | ||
FROM node:14.15.4 | ||
|
||
RUN mkdir -p /usr/app/src \ | ||
&& mkdir -p /usr/app/media \ | ||
&& mkdir -p /usr/app/scripts | ||
|
||
WORKDIR /usr/app/src | ||
RUN apt-get update | ||
RUN apt-get install netcat -y | ||
|
||
COPY package.json /usr/app/src | ||
COPY ./docker/statutory/bootstrap.sh /usr/app/scripts/bootstrap.sh | ||
COPY ./docker/statutory/wait.sh /usr/app/scripts/wait.sh | ||
COPY . /usr/app/src | ||
|
||
RUN chown -R node:node /usr/app | ||
|
||
WORKDIR /usr/app/src | ||
|
||
USER node | ||
|
||
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | ||
ENV PATH="/home/node/.npm-global/bin:${PATH}" | ||
|
||
# FIXME remove nodemon for production | ||
RUN npm install -g nodemon@2.0.7 | ||
RUN npm install -g bunyan@1.8.15 | ||
RUN npm cache clean --force | ||
RUN npm install | ||
|
||
COPY --chown=node:node ./docker/statutory/bootstrap.sh /usr/app/scripts/bootstrap.sh | ||
COPY --chown=node:node . /usr/app/src | ||
RUN mkdir /usr/app/src/state | ||
RUN npm install -g --loglevel warn nodemon bunyan && npm cache clean --force | ||
RUN npm install --loglevel warn | ||
|
||
# FIXME split up in ENTRYPOINT and CMD | ||
CMD ["sh", "/usr/app/scripts/bootstrap.sh && nodemon -e 'js,json' lib/run.js"] | ||
CMD sh /usr/app/scripts/bootstrap.sh && nodemon -e "js,json" lib/run.js | ||
|
||
EXPOSE 8084 |
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 |
---|---|---|
|
@@ -3,5 +3,3 @@ echo "Creating database..." | |
npm run db:create | ||
echo "Migrating database..." | ||
npm run db:migrate | ||
|
||
sh -c "${@}" |
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,10 @@ | ||
#!/bin/bash | ||
|
||
echo "Waiting for bootstrap" | ||
|
||
while ! nc -z localhost 8084; do | ||
sleep 0.1 | ||
done | ||
|
||
echo "Bootstrap finished" | ||
|
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
Oops, something went wrong.