Skip to content

Commit d0f287a

Browse files
committed
generate internal command token properly
1 parent 25f2137 commit d0f287a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

other/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,16 @@ ENV DATABASE_PATH="$LITEFS_DIR/$DATABASE_FILENAME"
6161
ENV DATABASE_URL="file:$DATABASE_PATH"
6262
ENV CACHE_DATABASE_FILENAME="cache.db"
6363
ENV CACHE_DATABASE_PATH="$LITEFS_DIR/$CACHE_DATABASE_FILENAME"
64-
ENV INTERNAL_COMMAND_TOKEN=$(openssl rand -hex 32)
6564
ENV INTERNAL_PORT="8080"
6665
ENV PORT="8081"
6766
ENV NODE_ENV="production"
6867
# For WAL support: https://github.com/prisma/prisma-engines/issues/4675#issuecomment-1914383246
6968
ENV PRISMA_SCHEMA_DISABLE_ADVISORY_LOCK = "1"
7069

70+
# Generate random value and set it as environment variable
71+
RUN INTERNAL_COMMAND_TOKEN=$(openssl rand -hex 32) && \
72+
echo "INTERNAL_COMMAND_TOKEN=$INTERNAL_COMMAND_TOKEN" >> /etc/environment
73+
7174
# add shortcut for connecting to database CLI
7275
RUN echo "#!/bin/sh\nset -x\nsqlite3 \$DATABASE_URL" > /usr/local/bin/database-cli && chmod +x /usr/local/bin/database-cli
7376

0 commit comments

Comments
 (0)