Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Feature/Set up tini (#3168)
Bastien Jeannelle754e98099cd8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c29fa3d372..839baab2dd 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Added- Extended the content of the _SaaS_ and _Self-Hosting_ sections by the backup strategy on the Frequently Asked Questions (FAQ) page+- Set up `Tini` to avoid zombie processes and perform signal forwarding in docker image- Added an index for `dataSource` / `symbol` to the market data database table### Changeddiff --git a/Dockerfile b/Dockerfileindex 1a557b8c44..9738eafc16 100644--- a/Dockerfile+++ b/Dockerfile@@ -56,7 +56,14 @@ RUN apt update && apt install -y \openssl \&& rm -rf /var/lib/apt/lists/*+# Add tini, which is an init process that handles signaling within the container+# and with the host. See https://github.com/krallin/tini+ENV TINI_VERSION v0.19.0+ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini+RUN chmod +x /tini+ENTRYPOINT ["/tini", "--"]+COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps-WORKDIR /ghostfolio/apps/api+COPY ./docker/entrypoint.sh /ghostfolio/entrypoint.shEXPOSE ${PORT:-3333}-CMD [ "yarn", "start:production" ]+CMD [ "/ghostfolio/entrypoint.sh" ]diff --git a/docker/entrypoint.sh b/docker/entrypoint.shnew file mode 100755index 0000000000..71cf6f2dc8--- /dev/null+++ b/docker/entrypoint.sh@@ -0,0 +1,12 @@+#!/bin/sh++set -ex++echo "Running database migrations"+npx prisma migrate deploy++echo "Seeding the database"+npx prisma db seed++echo "Starting the server"+node main