File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11include extra/.env
22
33help :
4- @echo " Main targets: build / specs / up / server / specs / shell"
4+ @echo -e " ${COMPOSE_PROJECT_NAME} - Main project commands:\n\
5+ make up # starts the dev services (optional env vars: RUBY / RAILS / ACTIVEADMIN)\n\
6+ make specs # run the tests (after up)\n\
7+ make lint # run the linters (after up)\n\
8+ make server # run the server (after up)\n\
9+ make shell # open a shell (after up)\n\
10+ make down # cleanup (after up)\n\
11+ Example: RUBY=3.2 RAILS=7.1.0 ACTIVEADMIN=3.2.0 make up"
512
6- # Docker commands
13+ # System commands
714
815build :
9- @rm -f Gemfile.lock
16+ @rm -f Gemfile.lock spec/dummy/db/ * .sqlite3
1017 @docker compose -f extra/docker-compose.yml build
1118
12- up : build
19+ db_reset :
20+ @docker compose -f extra/docker-compose.yml run --rm app bin/rails db:reset db:test:prepare
21+
22+ up : build db_reset
1323 @docker compose -f extra/docker-compose.yml up
1424
15- cleanup :
25+ shell :
26+ @docker compose -f extra/docker-compose.yml exec app bash
27+
28+ down :
1629 @docker compose -f extra/docker-compose.yml down --volumes --rmi local --remove-orphans
1730
1831# App commands
1932
20- server :
21- @docker compose -f extra/docker-compose.yml exec app bin/rails s -b 0.0.0.0 -p ${SERVER_PORT}
22-
23- specs :
24- @docker compose -f extra/docker-compose.yml exec app bin/rspec --fail-fast
33+ console :
34+ @docker compose -f extra/docker-compose.yml exec app bin/rails console
2535
2636lint :
2737 @docker compose -f extra/docker-compose.yml exec app bin/rubocop
2838
29- shell :
30- @docker compose -f extra/docker-compose.yml exec app bash
39+ server :
40+ @docker compose -f extra/docker-compose.yml exec app bin/rails server -b 0.0.0.0 -p ${SERVER_PORT}
41+
42+ specs :
43+ @docker compose -f extra/docker-compose.yml exec app bin/rspec --fail-fast
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ ENV DEVEL=1
66ENV LANG=C.UTF-8
77
88RUN apt-get update -qq
9- RUN apt-get install -yqq --no-install-recommends build-essential chromium libyaml-dev nano netcat-traditional pkg-config
9+ RUN apt-get install -yqq --no-install-recommends build-essential chromium less libyaml-dev nano netcat-traditional pkg-config
1010
1111ARG BUNDLER_VERSION
1212RUN gem install bundler -v ${BUNDLER_VERSION}
@@ -26,6 +26,6 @@ ENV ACTIVEADMIN_VERSION=$ACTIVEADMIN_VERSION
2626WORKDIR /app
2727COPY . /app
2828RUN bundle install
29- RUN chown -R app:app /app/spec/dummy/db /usr/local/bundle
29+ RUN mkdir -p /app/spec/dummy/db && chown -R app:app /app/spec/dummy/db /usr/local/bundle
3030
3131RUN ln -s /app/extra/.bashrc /home/app/.bashrc
Original file line number Diff line number Diff line change 1+ # Ignore everything but the required files for bundle install
2+ /**/*
3+
4+ !/*.gemspec
5+ !/Gemfile
6+ !/lib
Original file line number Diff line number Diff line change 22
33export DEVEL=1
44
5- export RAILS_VERSION=8.0.2
5+ export RAILS_VERSION=7.2.2.1
66export ACTIVEADMIN_VERSION=3.3.0
77
88export RAILS_ENV=development
Original file line number Diff line number Diff line change 22
33### Dev setup
44
5- There 3 ways to interact with this project:
5+ There are 2 ways to interact with this project:
66
771 ) Using Docker:
88
@@ -24,19 +24,7 @@ RUBY=3.2 RAILS=7.1.0 ACTIVEADMIN=3.2.0 make up
2424# For more commands please check the Makefile
2525```
2626
27- 2 ) Using Appraisal:
28-
29- ``` sh
30- export RAILS_ENV=development
31- # Install dependencies:
32- bin/appraisal
33- # Run server (or any command):
34- bin/appraisal rails s
35- # Or with a specific configuration:
36- bin/appraisal rails80-activeadmin rails s
37- ```
38-
39- 3 ) With a local setup:
27+ 2 ) With a local setup:
4028
4129``` sh
4230# Dev setup (set the required envs):
Original file line number Diff line number Diff line change @@ -17,4 +17,3 @@ services:
1717 - ..:/app
1818 stdin_open : true
1919 tty : true
20- command : ${COMMAND:-extra/init.sh}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments