5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 18:56:21 +00:00

Merge branch 'rails' of 0xacab.org:sutty/sutty into rails

This commit is contained in:
void 2021-01-09 19:22:34 +00:00
commit 70ed3476e4
2 changed files with 25 additions and 26 deletions

View file

@ -156,7 +156,7 @@ GEM
email_address (0.1.19)
netaddr (>= 2.0.4, < 3)
simpleidn
errbase (0.2.0)
errbase (0.2.1)
erubi (1.10.0)
eventmachine (1.2.7)
exception_notification (4.4.3)
@ -203,7 +203,7 @@ GEM
thor
hiredis (0.6.3)
http_parser.rb (0.6.0)
i18n (1.8.5)
i18n (1.8.7)
concurrent-ruby (~> 1.0)
icalendar (2.7.0)
ice_cube (~> 0.16)
@ -300,7 +300,7 @@ GEM
mini_histogram (0.3.1)
mini_magick (4.11.0)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
mini_portile2 (2.5.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
@ -311,8 +311,9 @@ GEM
request_store (~> 1.0)
netaddr (2.0.4)
nio4r (2.5.4)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogiri (1.11.0)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
orm_adapter (0.5.0)
parallel (1.20.1)
parser (3.0.0.0)
@ -331,6 +332,7 @@ GEM
nio4r (~> 2.0)
pundit (2.1.0)
activesupport (>= 3.0.0)
racc (1.5.2)
rack (2.2.3)
rack-cors (1.1.1)
rack (>= 2.0.0)
@ -438,7 +440,7 @@ GEM
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (1.3.0)
rubocop-ast (1.4.0)
parser (>= 2.7.1.5)
rubocop-rails (2.9.1)
activesupport (>= 4.2.0)
@ -447,7 +449,7 @@ GEM
ruby-enum (0.8.0)
i18n
ruby-filemagic (0.7.2)
ruby-progressbar (1.10.1)
ruby-progressbar (1.11.0)
ruby-statistics (2.1.2)
ruby-vips (2.0.17)
ffi (~> 1.9)

View file

@ -14,8 +14,8 @@ public/packs/manifest.json: $(assets)
assets: public/packs/manifest.json
serve:
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"
serve: /etc/hosts
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
clean:
@ -39,14 +39,16 @@ load:
mkdir -p $@
gem_dir := $(shell readlink -f ../gems)
gem_cache_dir := $(gem_dir)/cache
gem_binary_dir := $(gem_dir)/$(alpine_version)
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 'test -f {}/ext/extconf.rb && basename {}')
gems := $(patsubst %,$(gem_dir)/cache/%.gem,$(gems))
gems_musl := $(patsubst $(gem_dir)/cache/%.gem,$(gem_dir)/$(alpine_version)/%-x86_64-linux-musl.gem,$(gems))
gems := $(shell bundle show --paths | xargs -I {} sh -c 'find {}/ext/ -name extconf.rb &>/dev/null && basename {}')
gems := $(patsubst %-x86_64-linux,%,$(gems))
gems := $(patsubst %,$(gem_cache_dir)/%.gem,$(gems))
gems_musl := $(patsubst $(gem_cache_dir)/%.gem,$(gem_binary_dir)/%-x86_64-linux-musl.gem,$(gems))
endif
$(gem_dir)/%-x86_64-linux-musl.gem:
$(gem_binary_dir)/%-x86_64-linux-musl.gem:
@docker run \
-v $(gem_dir):/srv/gems \
-v `readlink -f ~/.ccache`:/home/builder/.ccache \
@ -71,15 +73,10 @@ dirs := $(patsubst %,root/%,data sites deploy public)
$(dirs):
mkdir -p $@
test-container: $(dirs)
docker run -v $(PWD)/root/data:/srv/http/data \
-v $(PWD)/root/sites:/srv/http/_sites \
-v $(PWD)/root/deploy:/srv/http/_deploy \
-v $(PWD)/root/public:/srv/http/_public \
-v $(PWD)/config/credentials.yml.enc:/srv/http/config/credentials.yml.enc \
-e RAILS_MASTER_KEY=`cat config/master.key` \
-e RAILS_ENV=production \
-it \
--rm \
--name=sutty \
sutty/sutty /bin/sh
/etc/hosts: always
@echo "Chequeando si es necesario agregar el dominio local $(SUTTY)"
@grep -q " $(SUTTY)$$" $@ || echo -e "127.0.0.1 $(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@
@grep -q " api.$(SUTTY)$$" $@ || echo -e "127.0.0.1 api.$(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@
@grep -q " panel.$(SUTTY)$$" $@ || echo -e "127.0.0.1 panel.$(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@
.PHONY: always