mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 22:06:21 +00:00
actualizaciones de seguridad
This commit is contained in:
parent
a689eb0b4a
commit
58c6d28e12
4 changed files with 42 additions and 16 deletions
|
@ -1 +1 @@
|
|||
2.5.5
|
||||
2.5.7
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -14,6 +14,8 @@ git_source(:github) do |repo_name|
|
|||
"https://github.com/#{repo_name}.git"
|
||||
end
|
||||
|
||||
ruby '2.5.7'
|
||||
|
||||
gem 'dotenv-rails', require: 'dotenv/rails-now'
|
||||
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
|
|
|
@ -487,5 +487,8 @@ DEPENDENCIES
|
|||
webpacker
|
||||
yaml_db!
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.5.7p206
|
||||
|
||||
BUNDLED WITH
|
||||
2.0.2
|
||||
|
|
51
Makefile
51
Makefile
|
@ -1,5 +1,7 @@
|
|||
# Incluir las variables de entorno
|
||||
include .env
|
||||
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||
root_dir := $(patsubst %/,%,$(dir $(mkfile_path)))
|
||||
include $(root_dir)/.env
|
||||
|
||||
# Limpiar los archivos de testeo
|
||||
clean:
|
||||
|
@ -13,19 +15,38 @@ build:
|
|||
../gems/:
|
||||
mkdir -p $@
|
||||
|
||||
gem_dir := $(shell readlink -f ../gems)
|
||||
gems := $(shell bundle show --paths | xargs -I {} sh -c 'test -d {}/ext && basename {}')
|
||||
gems_musl := $(patsubst %,$(gem_dir)/%-x86_64-linux-musl.gem,$(gems))
|
||||
|
||||
$(gem_dir)/%-x86_64-linux-musl.gem:
|
||||
docker run \
|
||||
-v $(gem_dir):/srv/gems \
|
||||
-v `readlink -f ~/.ccache`:/home/builder/.ccache \
|
||||
-e HTTP_BASIC_USER=$(HTTP_BASIC_USER) \
|
||||
-e HTTP_BASIC_PASSWORD=$(HTTP_BASIC_PASSWORD) \
|
||||
-e GEM=`echo $* | sed -re "s/-[^-]+$$//"` \
|
||||
-e VERSION=`echo $* | sed -re "s/.*-([^-]+)$$/\1/"` \
|
||||
sutty/gem-compiler:latest
|
||||
|
||||
# Compilar todas las gemas binarias y subirlas a gems.sutty.nl para que
|
||||
# al crear el contenedor no tengamos que compilarlas cada vez
|
||||
convert-gems: ../gems/
|
||||
bundle show --paths \
|
||||
| xargs -I {} sh -c 'test -d {}/ext && basename {}' \
|
||||
| sed -re "s/-([^-]+)$$/\t\1/" \
|
||||
| while read gem version; do \
|
||||
docker run \
|
||||
-v `readlink -f $<`:/srv/gems \
|
||||
-v `readlink -f ~/.ccache`:/home/builder/.ccache \
|
||||
-e HTTP_BASIC_USER=$(HTTP_BASIC_USER) \
|
||||
-e HTTP_BASIC_PASSWORD=$(HTTP_BASIC_PASSWORD) \
|
||||
-e GEM=$$gem \
|
||||
-e VERSION=$$version \
|
||||
sutty/gem-compiler:latest ; \
|
||||
done
|
||||
convert-gems: $(gems_musl)
|
||||
|
||||
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` \
|
||||
-it \
|
||||
--rm \
|
||||
--name=sutty \
|
||||
sutty/sutty \
|
||||
/bin/sh
|
||||
|
|
Loading…
Reference in a new issue