Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
# Copy to .env and fill in your values

# ==================== Database ====================
# Local development
DATABASE_URL=postgres://momshell:momshell@localhost:5432/momshell?sslmode=disable
# Docker deployment (uses container name "postgres" as host)
# DATABASE_URL=postgres://momshell:momshell@postgres:5432/momshell?sslmode=disable

# Docker Postgres container settings
# Set strong, unique credentials here — never commit real passwords
POSTGRES_USER=momshell
POSTGRES_PASSWORD=momshell
POSTGRES_PASSWORD=CHANGE_ME
POSTGRES_DB=momshell
# Local development (keep credentials in sync with POSTGRES_* vars above)
DATABASE_URL=postgres://momshell:${POSTGRES_PASSWORD}@localhost:5432/momshell?sslmode=disable
# Docker deployment (uses container name "postgres" as host)
# DATABASE_URL=postgres://momshell:CHANGE_ME@postgres:5432/momshell?sslmode=disable

# ==================== JWT ====================
# IMPORTANT: Change this in production
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ on:
branches:
- "**"

permissions:
contents: read

jobs:
frontend-cq:
name: Frontend Code Quality
runs-on: ubuntu-latest
permissions:
contents: read

defaults:
run:
Expand All @@ -33,7 +32,7 @@ jobs:
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- run: npm ci
- run: npm ci --ignore-scripts

- name: ESLint
run: npm run lint
Expand All @@ -47,6 +46,8 @@ jobs:
go-cq:
name: Go Code Quality
runs-on: ubuntu-latest
permissions:
contents: read

defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion backend/internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func Load() *Config {
_ = godotenv.Overload("../.env")

cfg := &Config{
DatabaseURL: getEnv("DATABASE_URL", "postgres://user:password@localhost:5432/momshell?sslmode=disable"),
DatabaseURL: getEnv("DATABASE_URL", ""),
JWTSecretKey: getEnv("JWT_SECRET_KEY", "change-me-in-production"),
JWTAlgorithm: "HS256",
JWTAccessTokenExpireMin: getEnvInt("JWT_ACCESS_TOKEN_EXPIRE_MINUTES", 30),
Expand Down
11 changes: 6 additions & 5 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
restart: unless-stopped
env_file: ../.env
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-momshell}:${POSTGRES_PASSWORD:-momshell}@postgres:5432/${POSTGRES_DB:-momshell}?sslmode=disable
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable
CORS_ORIGINS: "*"
ports:
- "7860:7860"
Expand All @@ -19,16 +19,17 @@ services:
image: postgres:16-alpine
container_name: momshell-postgres
restart: unless-stopped
env_file: ../.env
environment:
POSTGRES_USER: ${POSTGRES_USER:-momshell}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-momshell}
POSTGRES_DB: ${POSTGRES_DB:-momshell}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- pgdata:/var/lib/postgresql/data
expose:
- "5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-momshell}"]
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 3s
retries: 5
Expand Down
Loading