first commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Copy this file to .env and fill in real values.
|
||||
# cp .env.example .env
|
||||
#
|
||||
# .env is read automatically by `docker compose` when it sits next to
|
||||
# docker-compose.yml. For running the app directly with `go run ./cmd/api`
|
||||
# (outside Docker), export these variables in your shell instead, or use a
|
||||
# tool like `direnv` / `godotenv` to load them (not included in this
|
||||
# project, but a natural addition later).
|
||||
|
||||
# --- Server ---
|
||||
PORT=8080
|
||||
# "development" or "production" - controls whether the session cookie
|
||||
# requires HTTPS (Secure flag). Keep this as "development" for local work.
|
||||
ENV=development
|
||||
# "debug" enables verbose debug-level log lines; anything else hides them.
|
||||
LOG_LEVEL=info
|
||||
|
||||
# --- MySQL ---
|
||||
# When running via docker-compose, DB_HOST must be "mysql" (the service
|
||||
# name) instead of 127.0.0.1 - see docker-compose.yml for why.
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_USER=root
|
||||
DB_PASSWORD=devpass
|
||||
DB_NAME=go_simple_api
|
||||
|
||||
# --- Redis ---
|
||||
# Same rule as DB_HOST: "redis" when running via docker-compose.
|
||||
REDIS_ADDR=127.0.0.1:6379
|
||||
|
||||
# --- Google OAuth2 ---
|
||||
# Get these from https://console.cloud.google.com/apis/credentials
|
||||
# Register the redirect URI below EXACTLY as your app's "Authorized
|
||||
# redirect URI" in the Google Cloud Console, or the OAuth flow will fail.
|
||||
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
|
||||
GOOGLE_CLIENT_SECRET=your-client-secret
|
||||
GOOGLE_REDIRECT_URL=http://localhost:8080/auth/google/callback
|
||||
|
||||
# --- CORS ---
|
||||
# Comma-separated list of frontend origins allowed to call this API from
|
||||
# browser JavaScript with credentials (cookies) attached.
|
||||
ALLOWED_ORIGINS=http://localhost:3000
|
||||
Reference in New Issue
Block a user