diff --git a/Dockerfile b/Dockerfile index abd2f67..ff62d58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,7 @@ COPY server/package*.json ./ RUN npm install --quite COPY server . -RUN mkdir -p storage -RUN cp .env.example .env -RUN sed -i "s#HVuwh1dmaFhg4q1fef7xI4D6UeV7ImGK6NTp7i9eH6qiyJ9kxsvqPu29JXnhNGQY#$(head -c 12 /dev/random | base64)#" .env +COPY ./run.sh . + +CMD ./run.sh -CMD ["npm", "run", "start"] diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..be1003e --- /dev/null +++ b/run.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +mkdir -p storage + +if [ ! -f ".env" ]; then + cp .env.example .env + sed -i "s#HVuwh1dmaFhg4q1fef7xI4D6UeV7ImGK6NTp7i9eH6qiyJ9kxsvqPu29JXnhNGQY#$(head -c 12 /dev/random | base64)#" .env +fi + +npm run start +