entrypoint changes

This commit is contained in:
Ryan 2025-04-09 23:04:10 +10:00
parent cd16f1ddb8
commit 36ecf3e89b

View File

@ -1,8 +1,9 @@
#!/bin/sh #!/bin/sh
set -e set -e
# Update apk repository and install git # Update apt repository, install git, and verify installation.
apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
echo "Git version:" $(git --version)
PROJECT_DIR="/app/my-medusa-app" PROJECT_DIR="/app/my-medusa-app"
@ -14,7 +15,7 @@ if [ ! -d "$PROJECT_DIR" ]; then
# --db-url: Uses the provided DATABASE_URL to connect and run migrations. # --db-url: Uses the provided DATABASE_URL to connect and run migrations.
# --no-browser: Skip opening the admin dashboard. # --no-browser: Skip opening the admin dashboard.
# --directory-path: Specify where to install the project. # --directory-path: Specify where to install the project.
# --with-nextjs-starter: Option to install the Next.js storefront. # --with-nextjs-starter: Optionally install the Next.js storefront.
npx create-medusa-app@latest my-medusa-app \ npx create-medusa-app@latest my-medusa-app \
--db-url "$DATABASE_URL" \ --db-url "$DATABASE_URL" \
--no-browser \ --no-browser \
@ -35,6 +36,6 @@ cd "$PROJECT_DIR"
# List the contents of the project directory to verify installation. # List the contents of the project directory to verify installation.
ls -la ls -la
# Finally, start the Medusa server in development/production mode. # Finally, start the Medusa server (development/production mode as desired).
echo "Starting Medusa server..." echo "Starting Medusa server..."
exec npm start exec npm start