mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
ruby: add recipes to work with docker
This commit is contained in:
@ -17,12 +17,12 @@ else
|
||||
endif
|
||||
|
||||
.PHONY: help
|
||||
help: # Show help message for each of the Makefile recipes.
|
||||
help: # Show help message for each of the Makefile recipes.
|
||||
@grep -E "^[a-z-]+: #" $(MAKEFILE_LIST) | \
|
||||
awk 'BEGIN {FS = ": # "}; {printf "%s: %s\n", $$1, $$2}'
|
||||
|
||||
.PHONY: dev
|
||||
dev: # Install development dependencies and initialize the project.
|
||||
dev: # Install development dependencies and initialize the project.
|
||||
@bundle install
|
||||
@bundle exec rake app:update:bin
|
||||
ifeq ($(SORBET_SUPPORTED),1)
|
||||
@ -30,25 +30,47 @@ ifeq ($(SORBET_SUPPORTED),1)
|
||||
endif
|
||||
|
||||
.PHONY: prod
|
||||
prod: # Install production dependencies.
|
||||
prod: # Install production dependencies.
|
||||
@bundle install --without development doc test
|
||||
@bundle exec rake app:update:bin
|
||||
|
||||
.PHONY: server-dev
|
||||
server-dev: # Start the development server on localhost at $PORT (default: 3000).
|
||||
server-dev: # Start the development server on localhost at $PORT (default: 3000).
|
||||
@bundle exec rails server
|
||||
|
||||
.PHONY: server-prod
|
||||
server-prod: # Start the poruction server on 0.0.0.0 at $PORT (default: 3000).
|
||||
server-prod: # Start the poruction server on 0.0.0.0 at $PORT (default: 3000).
|
||||
@bundle exec rails server --environment production
|
||||
|
||||
.PHONY: compose-dev
|
||||
compose-dev: # Up containers in a development environment.
|
||||
@docker-compose \
|
||||
--file compose-base.yml \
|
||||
--file compose-dev.yml \
|
||||
build
|
||||
@docker-compose \
|
||||
--file compose-base.yml \
|
||||
--file compose-dev.yml \
|
||||
up --detach
|
||||
|
||||
.PHONY: compose-prod
|
||||
compose-prod: # Up containers in a production environment.
|
||||
@docker-compose \
|
||||
--file compose-base.yml \
|
||||
--file compose-prod.yml \
|
||||
build
|
||||
@docker-compose \
|
||||
--file compose-base.yml \
|
||||
--file compose-prod.yml \
|
||||
up --detach
|
||||
|
||||
.PHONY: lint
|
||||
lint: # Lint the source code for style and check for types.
|
||||
lint: # Lint the source code for style and check for types.
|
||||
@bundle exec rubocop
|
||||
ifeq ($(SORBET_SUPPORTED),1)
|
||||
@bundle exec srb tc
|
||||
endif
|
||||
|
||||
.PHONY: test
|
||||
test: # Recursively run the tests.
|
||||
test: # Recursively run the tests.
|
||||
@bundle exec rake test
|
||||
|
||||
Reference in New Issue
Block a user