Skip to content

Commit

Permalink
fix: добавил условие в Dockerfile, для обхода ошибки в линте с .env
Browse files Browse the repository at this point in the history
  • Loading branch information
shamemask committed Dec 11, 2024
1 parent fd160d2 commit 190725d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .docker/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ WORKDIR /usr/src/app
COPY --from=build /usr/src/app/packages/server/ts-dist ./server/ts-dist
COPY --from=build /usr/src/app/packages/client/dist ./client/dist
COPY --from=build /usr/src/app/node_modules ./node_modules
COPY --from=build .env ./.env

# Ensure .env exists, if it does, copy it, otherwise copy .env.example to .env
RUN if [ -f .env ]; then cp .env .env; else cp .env.example .env; fi

# EXPOSE $SERVER_PORT
CMD [ "node", "server/ts-dist" ]
# CMD /bin/bash -c "tail -f /dev/null"

0 comments on commit 190725d

Please sign in to comment.