Browse Source
Enable signal handling from host to container, and within container
pull/3168/head
Sonlis
1 year ago
No known key found for this signature in database
GPG Key ID: 36B6093EBDC61B1
2 changed files with
21 additions and
2 deletions
-
Dockerfile
-
docker/entrypoint.sh
|
|
@ -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.sh |
|
|
|
EXPOSE ${PORT:-3333} |
|
|
|
CMD [ "yarn", "start:production" ] |
|
|
|
CMD [ "/ghostfolio/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 |