Refactor Dockerfile and CI Configuration
- Updated the CI configuration in .drone.yml to use the new Dockerfile located at ./cmd/web/Dockerfile. - Removed the old Dockerfile and Dockerfile-drone as they are no longer needed. - Refactored the cmd/web/Dockerfile to streamline the build process and improve organization. - Introduced a new bootstrap package to handle application initialization, including configuration, logging, MongoDB, Redis, and authorization service setup. - Added a health check endpoint for monitoring the server status, enhancing the API's operational capabilities.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package bootstrap
|
||||
|
||||
import (
|
||||
"tm/pkg/config"
|
||||
)
|
||||
|
||||
// Config holds configuration for the web command
|
||||
type Config struct {
|
||||
Server config.ServerConfig `mapstructure:"server"`
|
||||
Database config.DatabaseConfig `mapstructure:"database"`
|
||||
Cache config.CacheConfig `mapstructure:"cache"`
|
||||
Logging config.LoggingConfig `mapstructure:"logging"`
|
||||
RateLimit config.RateLimitConfig `mapstructure:"rate_limiting"`
|
||||
UserAuth AuthConfig `mapstructure:"user_authorization"`
|
||||
CustomerAuth AuthConfig `mapstructure:"customer_authorization"`
|
||||
}
|
||||
|
||||
type AuthConfig struct {
|
||||
JWT JWTConfig `mapstructure:"jwt"`
|
||||
}
|
||||
|
||||
type JWTConfig struct {
|
||||
AccessSecret string `mapstructure:"access_secret"`
|
||||
RefreshSecret string `mapstructure:"refresh_secret"`
|
||||
AccessExpiresIn int `mapstructure:"access_expires_in"`
|
||||
RefreshExpiresIn int `mapstructure:"refresh_expires_in"`
|
||||
}
|
||||
Reference in New Issue
Block a user