Compare commits

..

6 Commits
v0.2.0 ... main

Author SHA1 Message Date
0498d593c3 Fixed linter error
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2023-10-14 19:18:39 -04:00
e43a648a09 Added woodpecker config for running salt-lint
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-10-14 19:03:11 -04:00
89c831edb1 Fixed small typo in FreeBSD gitea data path 2023-03-22 13:48:20 -04:00
21c18d6b3a Fixed small typo in FreeBSD gitea data path 2023-03-22 13:46:20 -04:00
7ee5e455df Added database values to change; more work on the config file 2023-03-22 13:43:55 -04:00
9e9656b229 Added some configuration values to manage 2023-03-21 14:19:24 -04:00
5 changed files with 65 additions and 27 deletions

5
.woodpecker.yml Normal file
View File

@ -0,0 +1,5 @@
pipeline:
lint:
image: warpnetbv/salt-lint:v0.9.2
commands:
- 'find . -type f -name "*.sls" -print0 | xargs -0 --no-run-if-empty salt-lint'

View File

@ -18,6 +18,6 @@ gitea_config_file:
- template: 'jinja' - template: 'jinja'
- makedirs: True - makedirs: True
- context: - context:
gitea: {{ gitea.config | json }} gitea: {{ gitea.config | json }}
- require: - require:
- sls: {{ sls_package_install }} - sls: {{ sls_package_install }}

View File

@ -8,6 +8,33 @@ gitea:
config_owner: 'gitea' config_owner: 'gitea'
config_group: 'gitea' config_group: 'gitea'
config_mode: 0644 config_mode: 0644
config: {}
service_name: 'gitea' service_name: 'gitea'
service_enabled: True service_enabled: True
# App configuration defaults
config:
app_name: 'Gitea: Git with a cup of tea'
run_user: 'git'
run_mode: 'prod'
app_data_path: '/var/lib/gitea'
security:
secret_key: 'ChangeMeBeforeRunning'
server:
domain: 'localhost'
http_address: '127.0.0.1'
http_port: '3000'
app_url: 'http://localhost:3000/'
disable_ssh: False
ssh_domain: "%(DOMAIN)s"
ssh_port: 22
offline_mode: False
database:
driver: 'sqlite3'
host: '127.0.0.1:3306'
name: 'gitea'
user: 'gitea'
password: ''
path: '/var/lib/gitea/data/gitea.db'
ssl: 'disable'
charset: 'utf8'
log_sql: 'false'

View File

@ -22,21 +22,23 @@
# If you'd rather use the web-based installer, remove this conf/app.ini file # If you'd rather use the web-based installer, remove this conf/app.ini file
# and make /usr/local/etc/gitea/conf writeable to the git user. # and make /usr/local/etc/gitea/conf writeable to the git user.
APP_NAME = Gitea: Git with a cup of tea APP_NAME = {{ gitea.app_name }}
RUN_USER = git RUN_USER = {{ gitea.run_user }}
RUN_MODE = prod RUN_MODE = {{ gitea.run_mode }}
[database] [database]
DB_TYPE = sqlite3 DB_TYPE = {{ gitea.database.driver }}
HOST = 127.0.0.1:3306 HOST = {{ gitea.database.host }}
NAME = gitea NAME = {{ gitea.database.name }}
PASSWD = USER = {{ gitea.database.user }}
PATH = /var/db/gitea/gitea.db PASSWD = {{ gitea.database.password }}
SSL_MODE = disable PATH = {{ gitea.database.path }}
USER = root SSL_MODE = {{ gitea.database.ssl }}
CHARSET = {{ gitea.database.charset }}
LOG_SQL = {{ gitea.database.log_sql }}
[indexer] [indexer]
ISSUE_INDEXER_PATH = /var/db/gitea/indexers/issues.bleve ISSUE_INDEXER_PATH = {{ gitea.app_data_path }}/indexers/issues.bleve
[log] [log]
ROOT_PATH = /var/log/gitea ROOT_PATH = /var/log/gitea
@ -50,38 +52,38 @@ ENABLED = false
JWT_SECRET = D56bmu6xCtEKs9vKKgMKnsa4X9FDwo64HVyaS4fQ4mY JWT_SECRET = D56bmu6xCtEKs9vKKgMKnsa4X9FDwo64HVyaS4fQ4mY
[picture] [picture]
AVATAR_UPLOAD_PATH = /var/db/gitea/data/avatars AVATAR_UPLOAD_PATH = {{ gitea.app_data_path }}/data/avatars
DISABLE_GRAVATAR = false DISABLE_GRAVATAR = false
ENABLE_FEDERATED_AVATAR = false ENABLE_FEDERATED_AVATAR = false
[repository] [repository]
ROOT = /var/db/gitea/gitea-repositories ROOT = {{ gitea.app_data_path }}/gitea-repositories
# Gitea's default is 'bash', so if you have bash installed, you can comment # Gitea's default is 'bash', so if you have bash installed, you can comment
# this out. # this out.
SCRIPT_TYPE = sh SCRIPT_TYPE = sh
[repository.upload] [repository.upload]
TEMP_PATH = /var/db/gitea/data/tmp/uploads TEMP_PATH = {{ gitea.app_data_path }}/data/tmp/uploads
[security] [security]
INSTALL_LOCK = true INSTALL_LOCK = true
INTERNAL_TOKEN = 1FFhAklka01JhgJTRUrFujWYiv4ijqcTIfXJ9o4n1fWxz+XVQdXhrqDTlsnD7fvz7gugdhgkx0FY2Lx6IBdPQw== INTERNAL_TOKEN = 1FFhAklka01JhgJTRUrFujWYiv4ijqcTIfXJ9o4n1fWxz+XVQdXhrqDTlsnD7fvz7gugdhgkx0FY2Lx6IBdPQw==
SECRET_KEY = ChangeMeBeforeRunning SECRET_KEY = {{ gitea.security.secret_key }}
[session] [session]
PROVIDER = file PROVIDER = file
PROVIDER_CONFIG = /var/db/gitea/data/sessions PROVIDER_CONFIG = {{ gitea.app_data_path }}/data/sessions
[server] [server]
DOMAIN = localhost DOMAIN = {{ gitea.server.domain }}
HTTP_ADDR = 127.0.0.1 HTTP_ADDR = {{ gitea.server.http_address }}
HTTP_PORT = 3000 HTTP_PORT = {{ gitea.server.http_port }}
ROOT_URL = http://localhost:3000/ ROOT_URL = {{ gitea.server.app_url }}
DISABLE_SSH = false DISABLE_SSH = {{ gitea.server.disable_ssh }}
SSH_DOMAIN = %(DOMAIN)s SSH_DOMAIN = {{ gitea.server.ssh_domain }}
SSH_PORT = 22 SSH_PORT = {{ gitea.server.ssh_port }}
OFFLINE_MODE = false OFFLINE_MODE = {{ gitea.server.offline_mode }}
APP_DATA_PATH = /var/db/gitea/data APP_DATA_PATH = {{ gitea.app_data_path }}/data
[service] [service]
REGISTER_EMAIL_CONFIRM = false REGISTER_EMAIL_CONFIRM = false

View File

@ -3,3 +3,7 @@
FreeBSD: FreeBSD:
config_path: '/usr/local/etc/gitea/conf/app.ini' config_path: '/usr/local/etc/gitea/conf/app.ini'
config:
app_data_path: '/var/db/gitea'
database:
path: '/var/db/gitea/data/gitea.db'