This commit is contained in:
vipg
2026-02-10 10:53:26 +08:00
parent 919ef704af
commit a33e6be08f
4 changed files with 28 additions and 0 deletions

View File

@@ -15,6 +15,9 @@ import (
func main() {
port := utils.GetEnv("PORT", "8081")
if err := logger.SetupFile(utils.GetEnv("LOG_FILE", "/var/log/app/country.log")); err != nil {
logger.L().Printf("setup file logger error: %v", err)
}
srv := &http.Server{
Addr: ":" + port,
Handler: routes(),

View File

@@ -38,6 +38,8 @@ services:
JWT_TTL: "24h"
ports:
- "8080:8080"
volumes:
- ./shared_data/logs/:/var/log/app/
depends_on:
postgres:
condition: service_healthy
@@ -53,6 +55,8 @@ services:
# PORT: "8081"
# ports:
# - "8081:8081"
# volumes:
# - ../shared_data/logs/:/var/log/app/
# restart: unless-stopped
volumes:

View File

@@ -23,6 +23,9 @@ var pg *sql.DB
func main() {
port := utils.GetEnv("PORT", "8080")
if err := logger.SetupFile(utils.GetEnv("LOG_FILE", "/var/log/app/user.log")); err != nil {
logger.L().Printf("setup file logger error: %v", err)
}
srv := &http.Server{
Addr: ":" + port,
Handler: routes(),