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
2785ce71
Commit
2785ce71
authored
Mar 11, 2025
by
Ivan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 挂载 bundle 产物 & 修正 cmd
parent
803cda13
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Dockerfile
Dockerfile
+5
-4
deploy.yml
config/deploy.yml
+4
-1
No files found.
Dockerfile
View file @
2785ce71
...
@@ -28,7 +28,7 @@ RUN apt-get update -qq && \
...
@@ -28,7 +28,7 @@ RUN apt-get update -qq && \
# Set production environment and optimize memory usage
# Set production environment and optimize memory usage
ENV
RAILS_ENV="production" \
ENV
RAILS_ENV="production" \
BUNDLE_DEPLOYMENT="1" \
BUNDLE_DEPLOYMENT="1" \
BUNDLE_PATH="/
usr/local/
bundle" \
BUNDLE_PATH="/bundle" \
BUNDLE_WITHOUT="development" \
BUNDLE_WITHOUT="development" \
BUNDLE_JOBS="4" \
BUNDLE_JOBS="4" \
BUNDLE_RETRY="3" \
BUNDLE_RETRY="3" \
...
@@ -48,10 +48,11 @@ RUN mkdir -p \
...
@@ -48,10 +48,11 @@ RUN mkdir -p \
/rails/log
\
/rails/log
\
/rails/tmp/pids
\
/rails/tmp/pids
\
/rails/tmp/cache
\
/rails/tmp/cache
\
/rails/tmp/sockets
/rails/tmp/sockets
\
/bundle
# Declare volumes for persistent storage
# Declare volumes for persistent storage
VOLUME
["/root/.ssh", "/rails/code", "/rails/storage", "/rails/public/uploads", "/rails/public/vite", "/rails/node_modules", "/rails/log", "/rails/tmp"]
VOLUME
["/root/.ssh", "/rails/code", "/rails/storage", "/rails/public/uploads", "/rails/public/vite", "/rails/node_modules", "/rails/log", "/rails/tmp"
, "/bundle"
]
# Copy entrypoint script
# Copy entrypoint script
COPY
bin/docker-entrypoint /rails/bin/
COPY
bin/docker-entrypoint /rails/bin/
...
@@ -70,4 +71,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
...
@@ -70,4 +71,4 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"]
# Start server via Thruster by default, this can be overwritten at runtime
# Start server via Thruster by default, this can be overwritten at runtime
EXPOSE
80
EXPOSE
80
CMD
["./bin/
thrust", "./bin/
rails", "server"]
CMD
["./bin/rails", "server"]
config/deploy.yml
View file @
2785ce71
...
@@ -101,6 +101,9 @@ volumes:
...
@@ -101,6 +101,9 @@ volumes:
-
"
/root/img_manager/logs:/rails/log"
-
"
/root/img_manager/logs:/rails/log"
# Tmp directory for pids and other temporary files
# Tmp directory for pids and other temporary files
-
"
/root/img_manager/tmp:/rails/tmp"
-
"
/root/img_manager/tmp:/rails/tmp"
# Bundle gems storage
-
"
/root/img_manager/bundle:/bundle"
# SSH keys for Git access
-
"
/root/.ssh:/root/.ssh"
-
"
/root/.ssh:/root/.ssh"
...
@@ -112,7 +115,7 @@ asset_path: false
...
@@ -112,7 +115,7 @@ asset_path: false
# Deployment configuration for better reliability
# Deployment configuration for better reliability
# Increase the time to wait for a container to become ready
# Increase the time to wait for a container to become ready
# deploy_timeout: 18
0
deploy_timeout
:
30
0
# # Increase the time to wait for a container to drain
# # Increase the time to wait for a container to drain
# drain_timeout: 60
# drain_timeout: 60
...
...
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