mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 23:26:21 +00:00
Merge branch 'rails' of 0xacab.org:sutty/sutty into rails
This commit is contained in:
commit
70ed3476e4
2 changed files with 25 additions and 26 deletions
16
Gemfile.lock
16
Gemfile.lock
|
@ -156,7 +156,7 @@ GEM
|
||||||
email_address (0.1.19)
|
email_address (0.1.19)
|
||||||
netaddr (>= 2.0.4, < 3)
|
netaddr (>= 2.0.4, < 3)
|
||||||
simpleidn
|
simpleidn
|
||||||
errbase (0.2.0)
|
errbase (0.2.1)
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
exception_notification (4.4.3)
|
exception_notification (4.4.3)
|
||||||
|
@ -203,7 +203,7 @@ GEM
|
||||||
thor
|
thor
|
||||||
hiredis (0.6.3)
|
hiredis (0.6.3)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
i18n (1.8.5)
|
i18n (1.8.7)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
icalendar (2.7.0)
|
icalendar (2.7.0)
|
||||||
ice_cube (~> 0.16)
|
ice_cube (~> 0.16)
|
||||||
|
@ -300,7 +300,7 @@ GEM
|
||||||
mini_histogram (0.3.1)
|
mini_histogram (0.3.1)
|
||||||
mini_magick (4.11.0)
|
mini_magick (4.11.0)
|
||||||
mini_mime (1.0.2)
|
mini_mime (1.0.2)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.5.0)
|
||||||
minima (2.5.1)
|
minima (2.5.1)
|
||||||
jekyll (>= 3.5, < 5.0)
|
jekyll (>= 3.5, < 5.0)
|
||||||
jekyll-feed (~> 0.9)
|
jekyll-feed (~> 0.9)
|
||||||
|
@ -311,8 +311,9 @@ GEM
|
||||||
request_store (~> 1.0)
|
request_store (~> 1.0)
|
||||||
netaddr (2.0.4)
|
netaddr (2.0.4)
|
||||||
nio4r (2.5.4)
|
nio4r (2.5.4)
|
||||||
nokogiri (1.10.10)
|
nokogiri (1.11.0)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.5.0)
|
||||||
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
parallel (1.20.1)
|
parallel (1.20.1)
|
||||||
parser (3.0.0.0)
|
parser (3.0.0.0)
|
||||||
|
@ -331,6 +332,7 @@ GEM
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
pundit (2.1.0)
|
pundit (2.1.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
|
racc (1.5.2)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
rack-cors (1.1.1)
|
rack-cors (1.1.1)
|
||||||
rack (>= 2.0.0)
|
rack (>= 2.0.0)
|
||||||
|
@ -438,7 +440,7 @@ GEM
|
||||||
rubocop-ast (>= 1.2.0, < 2.0)
|
rubocop-ast (>= 1.2.0, < 2.0)
|
||||||
ruby-progressbar (~> 1.7)
|
ruby-progressbar (~> 1.7)
|
||||||
unicode-display_width (>= 1.4.0, < 2.0)
|
unicode-display_width (>= 1.4.0, < 2.0)
|
||||||
rubocop-ast (1.3.0)
|
rubocop-ast (1.4.0)
|
||||||
parser (>= 2.7.1.5)
|
parser (>= 2.7.1.5)
|
||||||
rubocop-rails (2.9.1)
|
rubocop-rails (2.9.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
|
@ -447,7 +449,7 @@ GEM
|
||||||
ruby-enum (0.8.0)
|
ruby-enum (0.8.0)
|
||||||
i18n
|
i18n
|
||||||
ruby-filemagic (0.7.2)
|
ruby-filemagic (0.7.2)
|
||||||
ruby-progressbar (1.10.1)
|
ruby-progressbar (1.11.0)
|
||||||
ruby-statistics (2.1.2)
|
ruby-statistics (2.1.2)
|
||||||
ruby-vips (2.0.17)
|
ruby-vips (2.0.17)
|
||||||
ffi (~> 1.9)
|
ffi (~> 1.9)
|
||||||
|
|
35
Makefile
35
Makefile
|
@ -14,8 +14,8 @@ public/packs/manifest.json: $(assets)
|
||||||
|
|
||||||
assets: public/packs/manifest.json
|
assets: public/packs/manifest.json
|
||||||
|
|
||||||
serve:
|
serve: /etc/hosts
|
||||||
bundle exec rails s -b "ssl://0.0.0.0:3000?key=../sutty.local/domain/sutty.local.key&cert=../sutty.local/domain/sutty.local.crt"
|
bundle exec rails s -b "ssl://0.0.0.0:3000?key=../sutty.local/domain/$(SUTTY).key&cert=../sutty.local/domain/$(SUTTY).crt"
|
||||||
|
|
||||||
# Limpiar los archivos de testeo
|
# Limpiar los archivos de testeo
|
||||||
clean:
|
clean:
|
||||||
|
@ -39,14 +39,16 @@ load:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
gem_dir := $(shell readlink -f ../gems)
|
gem_dir := $(shell readlink -f ../gems)
|
||||||
|
gem_cache_dir := $(gem_dir)/cache
|
||||||
|
gem_binary_dir := $(gem_dir)/$(alpine_version)
|
||||||
ifeq ($(MAKECMDGOALS),build-gems)
|
ifeq ($(MAKECMDGOALS),build-gems)
|
||||||
gems := $(shell bundle show --paths | xargs -I {} sh -c 'test -f {}/ext/*/extconf.rb && basename {}')
|
gems := $(shell bundle show --paths | xargs -I {} sh -c 'find {}/ext/ -name extconf.rb &>/dev/null && basename {}')
|
||||||
gems += $(shell bundle show --paths | xargs -I {} sh -c 'test -f {}/ext/extconf.rb && basename {}')
|
gems := $(patsubst %-x86_64-linux,%,$(gems))
|
||||||
gems := $(patsubst %,$(gem_dir)/cache/%.gem,$(gems))
|
gems := $(patsubst %,$(gem_cache_dir)/%.gem,$(gems))
|
||||||
gems_musl := $(patsubst $(gem_dir)/cache/%.gem,$(gem_dir)/$(alpine_version)/%-x86_64-linux-musl.gem,$(gems))
|
gems_musl := $(patsubst $(gem_cache_dir)/%.gem,$(gem_binary_dir)/%-x86_64-linux-musl.gem,$(gems))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(gem_dir)/%-x86_64-linux-musl.gem:
|
$(gem_binary_dir)/%-x86_64-linux-musl.gem:
|
||||||
@docker run \
|
@docker run \
|
||||||
-v $(gem_dir):/srv/gems \
|
-v $(gem_dir):/srv/gems \
|
||||||
-v `readlink -f ~/.ccache`:/home/builder/.ccache \
|
-v `readlink -f ~/.ccache`:/home/builder/.ccache \
|
||||||
|
@ -71,15 +73,10 @@ dirs := $(patsubst %,root/%,data sites deploy public)
|
||||||
$(dirs):
|
$(dirs):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
|
||||||
test-container: $(dirs)
|
/etc/hosts: always
|
||||||
docker run -v $(PWD)/root/data:/srv/http/data \
|
@echo "Chequeando si es necesario agregar el dominio local $(SUTTY)"
|
||||||
-v $(PWD)/root/sites:/srv/http/_sites \
|
@grep -q " $(SUTTY)$$" $@ || echo -e "127.0.0.1 $(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@
|
||||||
-v $(PWD)/root/deploy:/srv/http/_deploy \
|
@grep -q " api.$(SUTTY)$$" $@ || echo -e "127.0.0.1 api.$(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@
|
||||||
-v $(PWD)/root/public:/srv/http/_public \
|
@grep -q " panel.$(SUTTY)$$" $@ || echo -e "127.0.0.1 panel.$(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@
|
||||||
-v $(PWD)/config/credentials.yml.enc:/srv/http/config/credentials.yml.enc \
|
|
||||||
-e RAILS_MASTER_KEY=`cat config/master.key` \
|
.PHONY: always
|
||||||
-e RAILS_ENV=production \
|
|
||||||
-it \
|
|
||||||
--rm \
|
|
||||||
--name=sutty \
|
|
||||||
sutty/sutty /bin/sh
|
|
||||||
|
|
Loading…
Reference in a new issue