Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

entrypoint.sh 877 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  1. ENV_LOCAL_PATH=/app/.env.local
  2. if test -z "${DOTENV_LOCAL}" ; then
  3. if ! test -f "${ENV_LOCAL_PATH}" ; then
  4. echo "DOTENV_LOCAL was not found in the ENV variables and .env.local is not set using a bind volume. We are using the default .env config."
  5. fi;
  6. else
  7. echo "DOTENV_LOCAL was found in the ENV variables. Creating .env.local file."
  8. cat <<< "$DOTENV_LOCAL" > ${ENV_LOCAL_PATH}
  9. fi;
  10. if [ "$INCLUDE_DB" = "true" ] ; then
  11. echo "INCLUDE_DB is set to true."
  12. MONGODB_CONFIG="MONGODB_URL=mongodb://localhost:27017"
  13. if ! grep -q "^${MONGODB_CONFIG}$" ${ENV_LOCAL_PATH}; then
  14. echo "Appending MONGODB_URL"
  15. touch /app/.env.local
  16. echo -e "\n${MONGODB_CONFIG}" >> ${ENV_LOCAL_PATH}
  17. fi
  18. mkdir -p /data/db
  19. mongod &
  20. echo "Starting local MongoDB instance"
  21. fi;
  22. npm run build
  23. npm run preview -- --host 0.0.0.0 --port 3000
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...