Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ RUN chown app Gemfile.lock
RUN mkdir -p /var/log/nginx/qul.tarteel.ai

# precompile assets
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
RUN SECRET_KEY_BASE=$(ruby -e "require 'securerandom'; puts SecureRandom.hex(64)") ./bin/rails assets:precompile

#TODO: fix this, sprockets can't find the compiled assets.
# Compiling twice seems to be working
RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
RUN SECRET_KEY_BASE=$(ruby -e "require 'securerandom'; puts SecureRandom.hex(64)") ./bin/rails assets:precompile

# pg_dump
RUN apt-get install -y wget
Expand Down
10 changes: 7 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# QUL docker deployment

build the image:
Build the image:
```
docker build -t quranic-universal-library .
```
run it:

Run it:
```
docker run --rm -it -p 3000:3000 --env RAILS_MASTER_KEY=<content of config/master.key> quranic-universal-library
```
```

## Build Notes

The Docker build process automatically generates a temporary SECRET_KEY_BASE during asset precompilation. This resolves Rails 7.x validation requirements for production environment secret keys during the build process.