зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-03 18:25:51 +03:00
build: Improve dev setup
Этот коммит содержится в:
@@ -26,6 +26,6 @@ ENV ACTIVEADMIN_VERSION=$ACTIVEADMIN_VERSION
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN bundle install
|
||||
RUN mkdir -p /app/spec/dummy/db && chown -R app:app /app/spec/dummy/db /usr/local/bundle
|
||||
RUN chown -R app:app /usr/local/bundle
|
||||
|
||||
RUN ln -s /app/extra/.bashrc /home/app/.bashrc
|
||||
|
||||
@@ -4,5 +4,3 @@ export DEVEL=1
|
||||
|
||||
export RAILS_VERSION=7.2.2.1
|
||||
export ACTIVEADMIN_VERSION=3.3.0
|
||||
|
||||
export RAILS_ENV=development
|
||||
|
||||
@@ -1,29 +1,21 @@
|
||||
## Development
|
||||
|
||||
Overcommit can be used to ensure that Conventional commits are good.
|
||||
|
||||
### Dev setup
|
||||
|
||||
There 2 ways to interact with this project:
|
||||
There are 2 ways to interact with this project:
|
||||
|
||||
1) Using Docker:
|
||||
|
||||
```sh
|
||||
# Run rails server on the dummy app (=> http://localhost:3000 to access to ActiveAdmin):
|
||||
make up
|
||||
# Enter in a Rails console (with the dummy app started):
|
||||
make console
|
||||
# Enter in a shell (with the dummy app started):
|
||||
make shell
|
||||
# Run the linter on the project (with the dummy app started):
|
||||
make lint
|
||||
# Run the test suite (with the dummy app started):
|
||||
make specs
|
||||
# Remove container and image:
|
||||
make cleanup
|
||||
# To try different versions of Ruby/Rails/ActiveAdmin:
|
||||
RUBY=3.2 RAILS=7.1.0 ACTIVEADMIN=3.2.0 make up
|
||||
# For more commands please check the Makefile
|
||||
make up # starts the dev services (optional env vars: RUBY / RAILS / ACTIVEADMIN)
|
||||
make specs # run the tests (after up)
|
||||
make lint # run the linters (after up)
|
||||
make server # run the server (after up)
|
||||
make shell # open a shell (after up)
|
||||
make down # cleanup (after up)
|
||||
|
||||
# Example using specific versions:
|
||||
RUBY=3.2 RAILS=7.1 ACTIVEADMIN=3.2.0 make up
|
||||
```
|
||||
|
||||
2) With a local setup:
|
||||
|
||||
@@ -4,10 +4,10 @@ services:
|
||||
context: ..
|
||||
dockerfile: extra/Dockerfile
|
||||
args:
|
||||
ACTIVEADMIN_VERSION: ${ACTIVEADMIN:-}
|
||||
BUNDLER_VERSION: ${BUNDLER_VERSION}
|
||||
RAILS_VERSION: ${RAILS:-}
|
||||
RUBY_IMAGE: ruby:${RUBY:-3.4}-slim
|
||||
RAILS_VERSION: ${RAILS:-}
|
||||
ACTIVEADMIN_VERSION: ${ACTIVEADMIN:-}
|
||||
UID: ${UID}
|
||||
user: ${UID}:${GID}
|
||||
ports:
|
||||
|
||||
Ссылка в новой задаче
Block a user