File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed
Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ rails_ver = ENV.fetch('RAILS_VERSION', '')
2020rails = eval_version ( 'rails' , rails_ver )
2121gem ( *rails )
2222
23+ ransack_ver = ENV . fetch ( 'RANSACK_VERSION' , '' )
24+ ransack = eval_version ( 'ransack' , ransack_ver )
25+ gem ( *ransack )
26+
2327administrate_ver = ENV . fetch ( 'ADMINISTRATE_VERSION' , '' )
2428administrate = eval_version ( 'administrate' , administrate_ver )
2529gem ( *administrate )
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ include extra/.env
22
33help :
44 @echo -e " ${COMPOSE_PROJECT_NAME} - Main project commands:\n\
5- make up # starts the dev services (optional env vars: RUBY / RAILS / ADMINISTRATE)\n\
5+ make up # starts the dev services (optional env vars: RUBY / RAILS / RANSACK / ADMINISTRATE)\n\
66 make specs # run the tests (after up)\n\
77 make lint # run the linters (after up)\n\
88 make server # run the server (after up)\n\
99 make shell # open a shell (after up)\n\
1010 make down # cleanup (after up)\n\
11- Example: RUBY=3.2 RAILS=7.1 ADMINISTRATE=0.18.0 make up"
11+ Example: RUBY=3.2 RAILS=7.1 RANSACK=4.2.0 ADMINISTRATE=0.18.0 make up"
1212
1313# System commands
1414
@@ -44,4 +44,4 @@ server: seed
4444 @docker compose -f extra/docker-compose.yml exec app bin/rails server -b 0.0.0.0 -p ${SERVER_PORT}
4545
4646specs :
47- @docker compose -f extra/docker-compose.yml exec app bin/rspec --fail-fast
47+ @docker compose -f extra/docker-compose.yml exec app bin/rspec
Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ ARG UID
1616RUN useradd -u $UID --shell /bin/bash app
1717
1818RUN mkdir -p /home/app && chown -R app:app /home/app
19+ RUN chown -R app:app /usr/local/bundle
20+ RUN ln -s /app/extra/.bashrc /home/app/.bashrc
1921
2022ARG RAILS_VERSION
2123ENV RAILS_VERSION=$RAILS_VERSION
2224
25+ ARG RANSACK_VERSION
26+ ENV RANSACK_VERSION=$RANSACK_VERSION
27+
2328ARG ADMINISTRATE_VERSION
2429ENV ADMINISTRATE_VERSION=$ADMINISTRATE_VERSION
2530
31+ USER $UID
2632WORKDIR /app
2733COPY . /app
2834RUN bundle install
29- RUN chown -R app:app /usr/local/bundle
30-
31- RUN ln -s /app/extra/.bashrc /home/app/.bashrc
Original file line number Diff line number Diff line change @@ -7,15 +7,15 @@ There are 2 ways to interact with this project:
771 ) Using Docker:
88
99``` sh
10- make up # starts the dev services (optional env vars: RUBY / RAILS / ADMINISTRATE)
10+ make up # starts the dev services (optional env vars: RUBY / RAILS / RANSACK / ADMINISTRATE)
1111make specs # run the tests (after up)
1212make lint # run the linters (after up)
1313make server # run the server (after up)
1414make shell # open a shell (after up)
1515make down # cleanup (after up)
1616
1717# Example using specific versions:
18- RUBY=3.2 RAILS=7.1 ADMINISTRATE=0.18.0 make up
18+ RUBY=3.2 RAILS=7.1 RANSACK=4.2.0 ADMINISTRATE=0.18.0 make up
1919```
2020
21212 ) With a local setup:
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ services:
77 BUNDLER_VERSION : ${BUNDLER_VERSION}
88 RUBY_IMAGE : ruby:${RUBY:-3.4}-slim
99 RAILS_VERSION : ${RAILS:-}
10+ RANSACK_VERSION : ${RANSACK:-}
1011 ADMINISTRATE_VERSION : ${ADMINISTRATE:-}
1112 UID : ${UID}
1213 user : ${UID}:${GID}
You can’t perform that action at this time.
0 commit comments