-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.sample.yaml
More file actions
198 lines (155 loc) Β· 5.33 KB
/
Copy pathconfig.sample.yaml
File metadata and controls
198 lines (155 loc) Β· 5.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# This file contains sample and default values for the application configuration.
# Copy this file to ".config.yaml" and update the values according to your environment.
# This file is intended for local development and as a reference template.
# Application settings
app:
# Unique identifier of the running application instance.
# Useful when multiple instances are running (e.g., in containers or clusters).
# Appears in logs and monitoring systems.
id: "local-dev"
# Human-readable application name.
# Used in logs, metrics, tracing, and possibly UI/system integrations.
name: "MY-APP"
# Application version string.
# Can follow semantic versioning (e.g., 1.2.3), a commit hash, build timestamp,
# or any custom format.
# Used in logs and exposed via status endpoints (e.g., /api/status/).
version: "local-dev"
# Defines the current runtime environment.
# Allowed values:
# dev - Active development.
# test - Automated testing environment.
# staging - Pre-production validation.
# release - Production environment handling real traffic.
env: dev
# HTTP server settings
server:
# Network interface or hostname to bind the HTTP server to.
# Use "localhost" for local-only access.
# Use "0.0.0.0" to allow access from other machines.
host: localhost
# TCP port the HTTP server listens on.
# Must be available and not blocked by firewall rules.
port: 8080
# Base path prefix for API routes.
# For example, if set to "api", endpoints become:
# /api/users
# /api/status
api_base_path: api
# Public base address of the server (used for absolute URLs, redirects, email links, OAuth callbacks).
# Should include scheme (http/https).
addr: "https://yourhost.dev"
# Comma-separated list of domains for which automatic TLS certificates
# should be issued (e.g., via Let's Encrypt).
# Leave empty to disable automatic certificate provisioning.
autocert_hosts: ""
# PostgreSQL database configuration
db:
# Database host (hostname or IP address).
host: "localhost"
# PostgreSQL port number.
port: 5432
# Database user with appropriate privileges.
user: "postgres"
# Password for the database user.
password: "postgres"
# Database name used by the application.
name: "myapp_local_dev"
# Enables SQL query logging.
log_queries: true
# Email configuration
email:
# Email delivery driver.
#
# Allowed values:
# test - Emails are not sent (but stored in-memory and available for tests)
# smtp - Emails are sent via SMTP
driver: "test"
# Default "From" email address used in outgoing emails.
from: "mail@yourhost.dev"
smtp:
# SMTP server hostname.
host: "smtp.mailtrap.io"
# SMTP server port.
port: 2525
# SMTP authentication username.
username: "demo"
# SMTP authentication password.
password: "password"
# Session management
session:
# Session lifetime in hours.
# After this duration, the user must re-authenticate.
duration_hours: 24
# Secret key used to sign and validate session cookies or tokens.
# Changing this value invalidates all existing sessions.
key: "secret-key"
# Distributed tracing / observability
tracing:
# Enables or disables tracing instrumentation.
enabled: true
# Tracing backend driver.
#
# Allowed values:
# log - Writes trace spans to application logs.
# uptrace - Sends trace data to Uptrace.
driver: log
# Uptrace DSN
# Required if driver is set to "uptrace".
# See: https://uptrace.dev/get#dsn
uptrace_dsn: "https://**********@api.uptrace.dev?grpc=4317"
# File storage and uploads
files:
# Storage backend driver.
#
# Allowed values:
# local-fs - Stores files on local filesystem.
# in-memory-fs - Stores files in memory (for testing).
storage_driver: "local-fs"
# Maximum allowed upload size in megabytes.
# Requests exceeding this limit will be rejected.
max_upload_size_mb: 20
# Maximum width (in pixels) for uploaded images.
# Images larger than this may be resized.
image_max_width: 1500
# Maximum height (in pixels) for uploaded images.
image_max_height: 1500
# Width (in pixels) for generated preview images.
preview_width: 400
# Height (in pixels) for generated preview images.
preview_height: 400
local_fs:
# Directory path where files will be stored when using local-fs driver.
# "~" may need to be expanded by the application if supported.
storage_path: "~/uploaded-files/gopl-files"
# Logical storage structure for domain entities.
# Each entity can define subdirectories for different file types.
entities:
books:
covers:
# Subdirectory name for storing book cover images.
path: "book-covers"
# OpenAPI documentation
openapi:
# Enables serving OpenAPI (Swagger) specification.
enabled: true
# URL path where OpenAPI JSON/YAML is available.
# Example: /openapi
serve_path: openapi
# OAuth providers
google_oauth:
# OAuth 2.0 Client ID issued by Google.
client_id: ""
# OAuth 2.0 Client Secret issued by Google.
client_secret: ""
github_oauth:
# OAuth App Client ID issued by GitHub.
client_id: ""
# OAuth App Client Secret issued by GitHub.
client_secret: ""
# Administrators
admins:
# List of user UUIDs that have administrative privileges.
# These users bypass normal role checks and have full system access.
- "uuid-of-admin"
- "uuid-of-another-admin"