Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
img-manager
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Lan
img-manager
Commits
b44e4ec6
Commit
b44e4ec6
authored
Mar 11, 2025
by
Ivan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update entrypoint
parent
93a73348
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
secrets
.kamal/secrets
+4
-0
docker-entrypoint
bin/docker-entrypoint
+10
-2
No files found.
.kamal/secrets
View file @
b44e4ec6
...
...
@@ -14,5 +14,9 @@
# Replace 'your-docker-password' with your actual Docker Hub password
KAMAL_REGISTRY_PASSWORD=$(cat registry_password.key)
# Git credentials for private repositories
# 这里使用SSH私钥的内容作为GIT_CREDENTIALS
GIT_CREDENTIALS=$(cat ~/.ssh/id_rsa)
# Improve security by using a password manager. Never check config/master.key into git!
RAILS_MASTER_KEY=$(cat config/master.key)
bin/docker-entrypoint
View file @
b44e4ec6
...
...
@@ -193,9 +193,12 @@ for dir in app bin config db lib public vendor; do
done
# Link important files
for
file
in
Gemfile Gemfile.lock Rakefile config.ru
;
do
for
file
in
Gemfile Gemfile.lock Rakefile config.ru
package.json package-lock.json
;
do
if
[
-f
"/rails/code/
$file
"
]
;
then
ln
-sf
/rails/code/
$file
/rails/
$file
echo
"Linked
$file
"
else
echo
"Warning:
$file
not found in /rails/code"
fi
done
...
...
@@ -218,13 +221,18 @@ if [ "${@: -2:1}" == "./bin/rails" ] && [ "${@: -1:1}" == "server" ]; then
fi
# Install Node.js dependencies if needed
echo
"Installing Node.js dependencies..."
echo
"Checking for package.json..."
if
[
-f
"/rails/package.json"
]
;
then
echo
"Found package.json, installing Node.js dependencies..."
if
[
!
-d
"/rails/node_modules/node_modules"
]
||
[
"
$FORCE_NPM_INSTALL
"
=
"true"
]
;
then
npm
install
echo
"✅ Node.js dependencies installed"
else
echo
"✅ Node.js dependencies already installed"
fi
else
echo
"No package.json found in /rails, skipping npm install"
fi
# Prepare database files with proper permissions
echo
"Ensuring database files exist with proper permissions..."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment