mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Fix assets precompile in production env
This commit is contained in:
parent
b75b8670af
commit
dfe3be5232
5 changed files with 15 additions and 10 deletions
|
|
@ -1 +1 @@
|
|||
0.22.3
|
||||
0.22.4
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
# 0.22.4 - 2025-01-15
|
||||
|
||||
### Changed
|
||||
|
||||
- Run seeds even in prod env so Unraid users could have default user.
|
||||
- Precompile assets in production env using dummy secret key base.
|
||||
|
||||
# 0.22.3 - 2025-01-14
|
||||
|
||||
### Changed
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@ ENV BUNDLE_PATH=/usr/local/bundle/gems
|
|||
ENV RAILS_LOG_TO_STDOUT=true
|
||||
ENV RAILS_PORT=3000
|
||||
ENV RAILS_ENV=production
|
||||
ENV SECRET_KEY_BASE=$SECRET_KEY_BASE
|
||||
|
||||
|
||||
# Install dependencies for application
|
||||
RUN apk -U add --no-cache \
|
||||
|
|
@ -44,7 +42,7 @@ RUN bundle config set --local path 'vendor/bundle' \
|
|||
COPY ../. ./
|
||||
|
||||
# Precompile assets for production
|
||||
RUN bundle exec rake assets:precompile \
|
||||
RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rake assets:precompile \
|
||||
&& rm -rf node_modules tmp/cache
|
||||
|
||||
# Copy entrypoint scripts and grant execution permissions
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ services:
|
|||
start_period: 30s
|
||||
timeout: 10s
|
||||
dawarich_app:
|
||||
image: freikin/dawarich:latest
|
||||
image: dawarich:prod
|
||||
container_name: dawarich_app
|
||||
volumes:
|
||||
- dawarich_public:/var/app/public
|
||||
|
|
@ -91,9 +91,9 @@ services:
|
|||
resources:
|
||||
limits:
|
||||
cpus: '0.50' # Limit CPU usage to 50% of one core
|
||||
memory: '2G' # Limit memory usage to 2GB
|
||||
memory: '4G' # Limit memory usage to 2GB
|
||||
dawarich_sidekiq:
|
||||
image: freikin/dawarich:latest
|
||||
image: dawarich:prod
|
||||
container_name: dawarich_sidekiq
|
||||
volumes:
|
||||
- dawarich_public:/var/app/public
|
||||
|
|
@ -147,7 +147,7 @@ services:
|
|||
resources:
|
||||
limits:
|
||||
cpus: '0.50' # Limit CPU usage to 50% of one core
|
||||
memory: '2G' # Limit memory usage to 2GB
|
||||
memory: '4G' # Limit memory usage to 2GB
|
||||
|
||||
volumes:
|
||||
dawarich_db_data:
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ bundle exec rails db:migrate
|
|||
echo "Running DATA migrations..."
|
||||
bundle exec rake data:migrate
|
||||
|
||||
if [ "$RAILS_ENV" != "production" ]; then
|
||||
# if [ "$RAILS_ENV" != "production" ]; then
|
||||
echo "Running seeds..."
|
||||
bundle exec rails db:seed
|
||||
fi
|
||||
# fi
|
||||
|
||||
# run passed commands
|
||||
bundle exec ${@}
|
||||
|
|
|
|||
Loading…
Reference in a new issue