mirror of
https://github.com/plankanban/planka.git
synced 2025-08-09 07:25:24 +02:00
rename start.sh to docker-entrypoint.sh and rollback start.sh
This commit is contained in:
parent
55c618af06
commit
36c03cc0f6
5 changed files with 22 additions and 10 deletions
|
@ -19,13 +19,12 @@ jobs:
|
|||
- name: Workflow install pnpm
|
||||
run: npm install pnpm -g
|
||||
|
||||
- name: Client install dependencies
|
||||
- name: Install Planka dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./client
|
||||
|
||||
- name: Server install dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./server
|
||||
#- name: Server install dependencies
|
||||
# run: pnpm install
|
||||
# working-directory: ./server
|
||||
|
||||
- name: Server include into dist
|
||||
run: mv server/ dist/
|
||||
|
|
|
@ -36,7 +36,7 @@ RUN apk -U upgrade \
|
|||
USER node
|
||||
WORKDIR /app
|
||||
|
||||
COPY --chown=node:node start.sh .
|
||||
COPY --chown=node:node docker-entrypoint.sh .
|
||||
COPY --chown=node:node server .
|
||||
|
||||
RUN mv .env.sample .env
|
||||
|
@ -57,4 +57,4 @@ EXPOSE 1337
|
|||
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
|
||||
ENTRYPOINT ["/sbin/tini", "--"]
|
||||
|
||||
CMD ["./start.sh"]
|
||||
CMD ["./docker-entrypoint.sh"]
|
||||
|
|
|
@ -37,7 +37,7 @@ COPY --from=server-dependencies /usr/bin/tini /usr/local/bin/tini
|
|||
COPY --from=client /app/build public
|
||||
COPY --from=client /app/build/index.html views/index.ejs
|
||||
|
||||
COPY start.sh .
|
||||
COPY docker-entrypoint.sh .
|
||||
COPY server .
|
||||
|
||||
RUN mv .env.sample .env
|
||||
|
@ -66,4 +66,4 @@ EXPOSE 1337/tcp
|
|||
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
|
||||
ENTRYPOINT ["tini", "--"]
|
||||
|
||||
CMD ["./start.sh"]
|
||||
CMD ["./docker-entrypoint.sh"]
|
||||
|
|
13
docker-entrypoint.sh
Executable file
13
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
for i in $(seq 1 30); do
|
||||
echo "Attempting to initialize the database and start the Planka (attempt $i)..."
|
||||
node db/init.js &&
|
||||
exec node app.js --prod "$@" &&
|
||||
break || s=$?;
|
||||
echo "Failed (attempt $i). Waiting 5 seconds before the next attempt...";
|
||||
sleep 5;
|
||||
done
|
||||
|
||||
exit $s
|
2
start.sh
2
start.sh
|
@ -10,4 +10,4 @@ for i in $(seq 1 30); do
|
|||
sleep 5;
|
||||
done
|
||||
|
||||
exit $s
|
||||
exit $s
|
Loading…
Add table
Add a link
Reference in a new issue