aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web_graceful.go
Commit message (Collapse)AuthorAgeFilesLines
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Support Proxy protocol (#12527)zeripath2022-08-211-4/+4
| | | | | | | | | This PR adds functionality to allow Gitea to sit behind an HAProxy and HAProxy protocolled connections directly. Fix #7508 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make SSL cipher suite configurable (#17440)zeripath2021-11-201-9/+0
|
* Move FCGI req.URL.Path fix-up to the FCGI listener (#15292)zeripath2021-04-091-1/+8
| | | | | | | Simplify the web.go FCGI path by moving the req.URL.Path fix-up to listener Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Make internal SSH server host key path configurable (#14918)zeripath2021-03-081-8/+8
| | | | | | | | | | | * Make SSH server host key path configurable * make it possible to have multiple keys * Make gitea.rsa the default key * Add some more logging Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move install pages out of main macaron routes (#13195)zeripath2020-10-191-0/+6
| | | | | | | | | | | | | * Move install pages out of main macaron loop Signed-off-by: Andrew Thornton <art27@cantab.net> * Update templates/post-install.tmpl Co-authored-by: Lauris BH <lauris@nix.lv> * remove prefetch Signed-off-by: Andrew Thornton <art27@cantab.net>
* Graceful: Xorm, RepoIndexer, Cron and Others (#9282)zeripath2019-12-151-2/+2
| | | | | | | | | | | | * Change graceful to use a singleton obtained through GetManager instead of a global. * Graceful: Make TestPullRequests shutdownable * Graceful: Make the cron tasks graceful * Graceful: AddTestPullRequest run in graceful ctx * Graceful: SyncMirrors shutdown * Graceful: SetDefaultContext for Xorm to be HammerContext * Avoid starting graceful for migrate commands and checkout * Graceful: DeliverHooks now can be shutdown * Fix multiple syncing errors in modules/sync/UniqueQueue & Make UniqueQueue closable * Begin the process of making the repo indexer shutdown gracefully
* FCGI: Allow FCGI over unix sockets (#9298)zeripath2019-12-101-2/+2
| | | | | | * FCGI: Allow FCGI over unix sockets * fixup! FCGI: Allow FCGI over unix sockets
* Graceful: Allow graceful restart for fcgi (#9112)zeripath2019-11-241-0/+17
| | | | | | | | | * Graceful: Allow graceful restart for fcgi My previous interpretation was incorrect - we do not handle sockets being passed in over stdin * Update web.go
* Graceful: Allow graceful restart for unix sockets (#9113)zeripath2019-11-241-6/+6
| | | | Previously we could not handle graceful restarts for http over unix sockets. These can now be handled.
* Add Graceful shutdown for Windows and hooks for shutdown of goroutines (#8964)zeripath2019-11-211-4/+2
| | | | | | | | | | | | | | | | | | * Graceful Shutdown for windows and others Restructures modules/graceful, adding shutdown for windows, removing and replacing the old minwinsvc code. Creates a new waitGroup - terminate which allows for goroutines to finish up after the shutdown of the servers. Shutdown and terminate hooks are added for goroutines. * Remove unused functions - these can be added in a different PR * Add startup timeout functionality * Document STARTUP_TIMEOUT
* Restore Graceful Restarting & Socket Activation (#7274)zeripath2019-10-151-26/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prevent deadlock in indexer initialisation during graceful restart * Move from gracehttp to our own service to add graceful ssh * Add timeout for start of indexers and make hammer time configurable * Fix issue with re-initialization in indexer during tests * move the code to detect use of closed to graceful * Handle logs gracefully - add a pid suffix just before restart * Move to using a cond and a holder for indexers * use time.Since * Add some comments and attribution * update modules.txt * Use zero to disable timeout * Move RestartProcess to its own file * Add cleanup routine
* Better logging (#6038) (#6095)zeripath2019-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* refactor: show command help message. (#1486)Bo-Yi Wu2017-04-121-0/+1
|
* Cleanup log messagingGabriel Jackson2017-02-021-1/+1
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* fix windows build broken by #416Lunny Xiao2016-12-311-0/+44