entrypoint update
This commit is contained in:
parent
a0acc77b4b
commit
5d5a0bf390
@ -1,9 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
# Update apt repository, install git, and verify installation.
|
echo "Starting entrypoint script..."
|
||||||
apt-get update -y && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
||||||
echo "Git version:" $(git --version)
|
# Update apt repository, install git, and remove apt cache
|
||||||
|
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"
|
||||||
|
|
||||||
@ -12,10 +14,6 @@ if [ ! -d "$PROJECT_DIR" ]; then
|
|||||||
echo "Medusa project not found. Running installation..."
|
echo "Medusa project not found. Running installation..."
|
||||||
|
|
||||||
# Run the Medusa CLI generator silently with the desired options:
|
# Run the Medusa CLI generator silently with the desired options:
|
||||||
# --db-url: Uses the provided DATABASE_URL to connect and run migrations.
|
|
||||||
# --no-browser: Skip opening the admin dashboard.
|
|
||||||
# --directory-path: Specify where to install the project.
|
|
||||||
# --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 +33,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 (development/production mode as desired).
|
# Finally, start the Medusa server.
|
||||||
echo "Starting Medusa server..."
|
echo "Starting Medusa server..."
|
||||||
exec npm start
|
exec npm start
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user