Switch from Make to Rake
This commit is contained in:
parent
c7e87a871f
commit
ca0bc6e5c8
2
.envrc
2
.envrc
@ -1,4 +1,6 @@
|
||||
use rbenv
|
||||
PATH_add bin
|
||||
PATH_add bundler-bin
|
||||
|
||||
# export TF_VAR_do_token=$(pass jdormit-infra-do-token)
|
||||
# export DIGITALOCEAN_API_TOKEN=$(pass jdormit-infra-do-token)
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@
|
||||
*/**/.terraform
|
||||
*.tfstate*
|
||||
*/**/tmp/
|
||||
.bundle
|
||||
bundler-bin/*
|
||||
|
1
.ruby-version
Normal file
1
.ruby-version
Normal file
@ -0,0 +1 @@
|
||||
3.3.0
|
9
Gemfile
Normal file
9
Gemfile
Normal file
@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
||||
|
||||
gem "rake"
|
||||
|
||||
gem "erb", "~> 4.0"
|
18
Gemfile.lock
Normal file
18
Gemfile.lock
Normal file
@ -0,0 +1,18 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
cgi (0.4.1)
|
||||
erb (4.0.4)
|
||||
cgi (>= 0.3.3)
|
||||
rake (13.1.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86_64-darwin-23
|
||||
|
||||
DEPENDENCIES
|
||||
erb (~> 4.0)
|
||||
rake
|
||||
|
||||
BUNDLED WITH
|
||||
2.5.6
|
@ -1,28 +0,0 @@
|
||||
.PHONY: reissue-certs
|
||||
|
||||
packer-manifest.json: gitea.json \
|
||||
scripts/dependencies.sh \
|
||||
scripts/volume.sh \
|
||||
files/gitea.service \
|
||||
files/app.ini \
|
||||
files/certbot-renew.service \
|
||||
files/certbot-renew.timer \
|
||||
scripts/gitea.sh \
|
||||
files/gitea-nginx.conf \
|
||||
scripts/nginx.sh \
|
||||
tmp/do.ini
|
||||
packer build gitea.json
|
||||
|
||||
files/app.ini: templates/app.ini.template
|
||||
sigil -p -f templates/app.ini.template > files/app.ini
|
||||
|
||||
tmp/do.ini: templates/do.ini.template tmp
|
||||
sigil -p -f templates/do.ini.template > tmp/do.ini
|
||||
chmod 600 tmp/do.ini
|
||||
|
||||
tmp:
|
||||
mkdir tmp
|
||||
|
||||
reissue-certs:
|
||||
rm -rf certbot
|
||||
make
|
36
prod/gitea/packer/Rakefile
Normal file
36
prod/gitea/packer/Rakefile
Normal file
@ -0,0 +1,36 @@
|
||||
require "erb"
|
||||
|
||||
task :default => ["packer-manifest.json"]
|
||||
|
||||
file "packer-manifest.json" => [
|
||||
"gitea.json",
|
||||
"scripts/dependencies.sh",
|
||||
"scripts/volume.sh",
|
||||
"files/gitea.service",
|
||||
"files/app.ini",
|
||||
"files/certbot-renew.service",
|
||||
"files/certbot-renew.timer",
|
||||
"scripts/gitea.sh",
|
||||
"files/gitea-nginx.conf",
|
||||
"scripts/nginx.sh",
|
||||
"tmp/do.ini"
|
||||
] do |t|
|
||||
sh "packer build gitea.json"
|
||||
end
|
||||
|
||||
file "files/app.ini" => ["templates/app.ini.template"] do |t|
|
||||
template = ERB.new(File.read(t.source))
|
||||
File.write(t.name, template.result)
|
||||
end
|
||||
|
||||
file "tmp/do.ini" => ["templates/do.ini.template", "tmp"] do |t|
|
||||
template = ERB.new(File.read(t.source))
|
||||
File.write(t.name, template.result)
|
||||
chmod 0600, "tmp/do.ini"
|
||||
end
|
||||
|
||||
directory "tmp"
|
||||
|
||||
def env(var)
|
||||
ENV[var] || raise("Variable #{var} not found")
|
||||
end
|
@ -3,12 +3,12 @@ RUN_USER = git
|
||||
RUN_MODE = prod
|
||||
|
||||
[oauth2]
|
||||
JWT_SECRET = ${GITEA_JWT_SECRET:?}
|
||||
JWT_SECRET = <%= env('GITEA_JWT_SECRET') %>
|
||||
|
||||
[security]
|
||||
INSTALL_LOCK = true
|
||||
INTERNAL_TOKEN = ${GITEA_INTERNAL_TOKEN:?}
|
||||
SECRET_KEY = ${GITEA_SECRET_KEY:?}
|
||||
INTERNAL_TOKEN = <%= env('GITEA_INTERNAL_TOKEN') %>
|
||||
SECRET_KEY = <%= env('GITEA_SECRET_KEY') %>
|
||||
|
||||
[database]
|
||||
DB_TYPE = sqlite3
|
||||
@ -35,7 +35,7 @@ DISABLE_SSH = false
|
||||
SSH_PORT = 22
|
||||
LFS_START_SERVER = true
|
||||
LFS_CONTENT_PATH = /mnt/gitea/lfs
|
||||
LFS_JWT_SECRET = ${GITEA_LFS_JWT_SECRET:?}
|
||||
LFS_JWT_SECRET = <%= env('GITEA_LFS_JWT_SECRET') %>
|
||||
OFFLINE_MODE = false
|
||||
|
||||
[mailer]
|
||||
@ -43,7 +43,7 @@ ENABLED = true
|
||||
HOST = smtp.mailgun.org:587
|
||||
FROM = Jeremy Dormitzer's Git Forge <noreply@git.jeremydormitzer.com>
|
||||
USER = noreply@mg.git.jeremydormitzer.com
|
||||
PASSWD = ${GITEA_MAILGUN_PASSWORD:?}
|
||||
PASSWD = <%= env('GITEA_MAILGUN_PASSWORD') %>
|
||||
|
||||
[service]
|
||||
REGISTER_EMAIL_CONFIRM = true
|
||||
|
@ -1 +1 @@
|
||||
dns_digitalocean_token = ${DIGITALOCEAN_API_TOKEN:?}
|
||||
dns_digitalocean_token = <%= env('DIGITALOCEAN_API_TOKEN') %>
|
||||
|
Loading…
Reference in New Issue
Block a user