attributes

This commit is contained in:
William Mantly 2019-05-15 01:45:34 -04:00
parent a0406219f2
commit b49dfa915e
Signed by: wmantly
GPG Key ID: E1EEC7650BA97160
4 changed files with 12 additions and 9 deletions

5
Vagrantfile vendored
View File

@ -45,5 +45,10 @@ Vagrant.configure("2") do |config|
chef.cookbooks_path = "cookbooks/"
chef.roles_path = "roles"
chef.add_role("gitea")
chef.json = {
'custom-domain': 'localhost.vm42.us',
'custom-title': 'My gitea server!',
'db-password': 'mypassword',
}
end
end

View File

@ -1,5 +1,3 @@
target_locale = 'en_US.UTF-8'
postgresql_server_install 'My PostgreSQL Server install' do
initdb_locale 'en_US.utf8'
action :install
@ -20,7 +18,7 @@ postgresql_access 'local_postgres_superuser' do
end
postgresql_user 'gitea' do
password 'UserP4ssword'
password node['db-password']
# createrole true
end

View File

@ -1,4 +1,4 @@
APP_NAME = Gitea: Git with a cup of tea
APP_NAME = <%= node['custom-title'] %>
RUN_USER = gitea
RUN_MODE = prod
@ -15,7 +15,7 @@ DB_TYPE = postgres
HOST = 127.0.0.1:5432
NAME = gitea
USER = gitea
PASSWD = UserP4ssword
PASSWD = <%= node['db-password'] %>
SSL_MODE = disable
PATH = /opt/theta42/data/gitea.db
@ -23,10 +23,10 @@ PATH = /opt/theta42/data/gitea.db
ROOT = /root/gitea-repositories
[server]
SSH_DOMAIN = localhost
DOMAIN = localhost
SSH_DOMAIN = <%= node['custom-domain'] %>
DOMAIN = <%= node['custom-domain'] %>
HTTP_PORT = 3000
ROOT_URL = http://localhost:3000/
ROOT_URL = http://<%= node['custom-domain'] %>/
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true

View File

@ -1,7 +1,7 @@
server {
listen 80;
listen 443 ssl;
server_name localhost.vm42.us;
server_name <%= node['custom-domain'];
include autossl.conf;