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.cookbooks_path = "cookbooks/"
chef.roles_path = "roles" chef.roles_path = "roles"
chef.add_role("gitea") chef.add_role("gitea")
chef.json = {
'custom-domain': 'localhost.vm42.us',
'custom-title': 'My gitea server!',
'db-password': 'mypassword',
}
end end
end end

View File

@ -1,5 +1,3 @@
target_locale = 'en_US.UTF-8'
postgresql_server_install 'My PostgreSQL Server install' do postgresql_server_install 'My PostgreSQL Server install' do
initdb_locale 'en_US.utf8' initdb_locale 'en_US.utf8'
action :install action :install
@ -20,7 +18,7 @@ postgresql_access 'local_postgres_superuser' do
end end
postgresql_user 'gitea' do postgresql_user 'gitea' do
password 'UserP4ssword' password node['db-password']
# createrole true # createrole true
end 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_USER = gitea
RUN_MODE = prod RUN_MODE = prod
@ -15,7 +15,7 @@ DB_TYPE = postgres
HOST = 127.0.0.1:5432 HOST = 127.0.0.1:5432
NAME = gitea NAME = gitea
USER = gitea USER = gitea
PASSWD = UserP4ssword PASSWD = <%= node['db-password'] %>
SSL_MODE = disable SSL_MODE = disable
PATH = /opt/theta42/data/gitea.db PATH = /opt/theta42/data/gitea.db
@ -23,10 +23,10 @@ PATH = /opt/theta42/data/gitea.db
ROOT = /root/gitea-repositories ROOT = /root/gitea-repositories
[server] [server]
SSH_DOMAIN = localhost SSH_DOMAIN = <%= node['custom-domain'] %>
DOMAIN = localhost DOMAIN = <%= node['custom-domain'] %>
HTTP_PORT = 3000 HTTP_PORT = 3000
ROOT_URL = http://localhost:3000/ ROOT_URL = http://<%= node['custom-domain'] %>/
DISABLE_SSH = false DISABLE_SSH = false
SSH_PORT = 22 SSH_PORT = 22
LFS_START_SERVER = true LFS_START_SERVER = true

View File

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