Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FROM node:16
ENV TZ=Asia/Singapore
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get -y install postgresql-client-common
WORKDIR /app
COPY ./package.json ./
COPY . /app
Expand Down
5 changes: 5 additions & 0 deletions docker-misc/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"email": "",
"domain": "",
"certpath": ""
}
9 changes: 9 additions & 0 deletions docker-misc/updatecerts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

email=$(jq -r '.email' config.json)
domain=$(jq -r '.domain' config.json)
certpath=$(jq -r '.certpath' config.json)
certbot -m $email -d $domain -n
cp /etc/letsencrypt/$domain/*.pem $certpath
openssl dhparam -dsaparam -out $certpath/dhparam.pem 4096

7 changes: 6 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
sleep 60 #accomodate postgres DB startup without triggering shutdown
# sleep 60 #accomodate postgres DB startup without triggering shutdown
until psql -c 'SELECT * FROM Account'
do
echo 'Waiting...'
sleep 2
done
npm run build
npm run start