Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisassad committed Sep 17, 2024
1 parent b966177 commit e099121
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY --from=build /prod/commonwealth /prod/commonwealth
WORKDIR /prod/commonwealth
RUN apt-get update && apt-get install -y curl # Needed for heroku
ENV PORT=$PORT

CMD ./scripts/docker-start.sh
# If we plan on moving more applications to docker:
# 1. Add a line in the Dockerfile build stage to deploy that package
# 2. Write a new separate stage with an alias we can use to reference that specific application
6 changes: 0 additions & 6 deletions packages/commonwealth/Procfile

This file was deleted.

17 changes: 17 additions & 0 deletions packages/commonwealth/scripts/docker-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# start.sh

if [[ $DYNO == "web"* ]]; then
NODE_ENV=production node --import=extensionless/register --enable-source-maps ./build/server.js
elif [[ $DYNO == "consumer"* ]]; then
node --import=extensionless/register build/server/workers/commonwealthConsumer/commonwealthConsumer.js
elif [[ $DYNO == "evm-ce"* ]]; then
node --import=extensionless/register build/server/workers/evmChainEvents/startEvmPolling.js
elif [[ $DYNO == "knock"* ]]; then
node --import=extensionless/register build/server/workers/knock/knockWorker.js
elif [[ $DYNO == "message-relayer"* ]]; then
node --import=extensionless/register build/server/workers/messageRelayer/messageRelayer.js
elif [[ $DYNO == "release"* ]]; then
node --import=extensionless/register build/server/scripts/releasePhaseEnvCheck.js && \
npx sequelize-cli db:migrate --config server/sequelize.json && \
node --import=extensionless/register build/server/scripts/purgeCloudflareCache.js
fi

0 comments on commit e099121

Please sign in to comment.