File tree Expand file tree Collapse file tree 8 files changed +36
-52
lines changed Expand file tree Collapse file tree 8 files changed +36
-52
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
include extra/.env
2
2
3
3
help :
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"
5
12
6
- # Docker commands
13
+ # System commands
7
14
8
15
build :
9
- @rm -f Gemfile.lock
16
+ @rm -f Gemfile.lock spec/dummy/db/ * .sqlite3
10
17
@docker compose -f extra/docker-compose.yml build
11
18
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
13
23
@docker compose -f extra/docker-compose.yml up
14
24
15
- cleanup :
25
+ shell :
26
+ @docker compose -f extra/docker-compose.yml exec app bash
27
+
28
+ down :
16
29
@docker compose -f extra/docker-compose.yml down --volumes --rmi local --remove-orphans
17
30
18
31
# App commands
19
32
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
25
35
26
36
lint :
27
37
@docker compose -f extra/docker-compose.yml exec app bin/rubocop
28
38
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
6
6
ENV LANG=C.UTF-8
7
7
8
8
RUN 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
10
10
11
11
ARG BUNDLER_VERSION
12
12
RUN gem install bundler -v ${BUNDLER_VERSION}
@@ -26,6 +26,6 @@ ENV ACTIVEADMIN_VERSION=$ACTIVEADMIN_VERSION
26
26
WORKDIR /app
27
27
COPY . /app
28
28
RUN 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
30
30
31
31
RUN 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 2
2
3
3
export DEVEL=1
4
4
5
- export RAILS_VERSION=8.0.2
5
+ export RAILS_VERSION=7.2.2.1
6
6
export ACTIVEADMIN_VERSION=3.3.0
7
7
8
8
export RAILS_ENV=development
Original file line number Diff line number Diff line change 2
2
3
3
### Dev setup
4
4
5
- There 3 ways to interact with this project:
5
+ There 2 ways to interact with this project:
6
6
7
7
1 ) Using Docker:
8
8
@@ -24,19 +24,7 @@ RUBY=3.2 RAILS=7.1.0 ACTIVEADMIN=3.2.0 make up
24
24
# For more commands please check the Makefile
25
25
```
26
26
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:
40
28
41
29
``` sh
42
30
# Dev setup (set the required envs):
Original file line number Diff line number Diff line change @@ -17,4 +17,3 @@ services:
17
17
- ..:/app
18
18
stdin_open : true
19
19
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