Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dependencies (reinstalled during build)
node_modules/

# Build artifacts (generated during build)
.nuxt/
.output/

# Git history
.git/
.gitignore

# Local env — never bake secrets into the image
.env
.env.*
!.env.example

# Editor and OS artifacts
.DS_Store
*.log
.vscode/
.idea/
97 changes: 41 additions & 56 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,83 +1,68 @@
# ─────────────────────────────────────────────
# Applirank — Environment Variables
# ─────────────────────────────────────────────
# Copy this file to .env and fill in the values.
# Railway auto-detects this file and suggests variables during setup.
# ─────────────────────────────────────────────────────────────────────────────
# Applirank — Environment Variable Reference
# ─────────────────────────────────────────────────────────────────────────────
# Local development: run ./setup.sh — it generates .env automatically.
# Production / manual setup: copy this file to .env and fill in the values.
# Railway: auto-detects this file and suggests variables during setup.

# ─── Database (Docker Compose) ──────────────
# Used by docker-compose.yml to configure the local Postgres container
DB_USER=admin
DB_PASSWORD=changeme
# ─── Database ────────────────────────────────────────────────────────────────
# Used by docker-compose.yml to configure the Postgres container
DB_USER=applirank
DB_PASSWORD=change-me
DB_NAME=applirank

# ─── Database (App) ─────────────────────────
# PostgreSQL connection string (must match Docker Compose values above for local dev)
# Railway: provided automatically via ${{Postgres.DATABASE_URL}}
DATABASE_URL=postgresql://admin:changeme@localhost:5432/applirank
# PostgreSQL connection string (used by host tools: drizzle-kit, drizzle studio)
# docker-compose overrides this with the internal Docker hostname for the app.
# Railway: ${{Postgres.DATABASE_URL}}
DATABASE_URL=postgresql://applirank:change-me@localhost:5432/applirank

# ─── Authentication ──────────────────────────
# Random string, minimum 32 characters. Generate with: openssl rand -base64 32
BETTER_AUTH_SECRET=generate-a-random-string-at-least-32-chars-long
# ─── Authentication ──────────────────────────────────────────────────────────
# Min 32-character random string. Generate with: openssl rand -base64 32
BETTER_AUTH_SECRET=replace-with-openssl-rand-base64-32-output

# The public URL of the app (used for session cookies and OAuth callbacks)
# Local: http://localhost:3000 | Production: https://applirank.com
# Railway PR/preview: optional when RAILWAY_ENVIRONMENT_NAME is a preview env.
# In preview, Applirank resolves URL automatically in this order:
# 1) https://applirank-applirank-pr-${RAILWAY_GIT_PR_NUMBER}.up.railway.app
# 2) https://${RAILWAY_PUBLIC_DOMAIN}
# 3) BETTER_AUTH_URL (fallback)
# Public URL of the app (used for session cookies and OAuth callbacks)
# Local: http://localhost:3000 | Production: https://yourdomain.com
# Railway PR/preview: auto-resolved from RAILWAY_PUBLIC_DOMAIN
BETTER_AUTH_URL=http://localhost:3000

# Comma-separated allowed origins for auth requests.
# Railway recommendation:
# BETTER_AUTH_TRUSTED_ORIGINS=https://${{RAILWAY_PUBLIC_DOMAIN}}
# Multiple origins example:
# BETTER_AUTH_TRUSTED_ORIGINS=https://applirank.com,https://staging.applirank.com
# BETTER_AUTH_TRUSTED_ORIGINS=
# Comma-separated allowed origins (optional, for multi-domain setups)
# BETTER_AUTH_TRUSTED_ORIGINS=https://yourdomain.com

# ─── Object Storage (Docker Compose) ────────
# Used by docker-compose.yml to configure the local MinIO container
STORAGE_USER=admin
STORAGE_PASSWORD=changeme
# ─── Object Storage (S3-compatible) ──────────────────────────────────────────
# Used by docker-compose.yml to configure the MinIO container
STORAGE_USER=applirank
STORAGE_PASSWORD=change-me

# ─── Object Storage (App — S3-compatible) ───
# Local (MinIO via Docker Compose):
# S3_ENDPOINT=http://localhost:9000
# S3_FORCE_PATH_STYLE=true
#
# Railway (Storage Bucket):
# S3_ENDPOINT=${{Bucket.ENDPOINT}}
# S3_FORCE_PATH_STYLE=false
# App-level S3 config (used by host tools)
# docker-compose overrides S3_ENDPOINT with http://minio:9000 for the app container
# Local (MinIO): S3_ENDPOINT=http://localhost:9000, S3_FORCE_PATH_STYLE=true
# Railway Bucket: S3_ENDPOINT=${{Bucket.ENDPOINT}}, S3_FORCE_PATH_STYLE=false
S3_ENDPOINT=http://localhost:9000
S3_ACCESS_KEY=admin
S3_SECRET_KEY=changeme
S3_ACCESS_KEY=applirank
S3_SECRET_KEY=change-me
S3_BUCKET=applirank
S3_REGION=us-east-1

# Path-style URLs: true for MinIO (local dev), false for Railway Buckets / AWS S3
S3_FORCE_PATH_STYLE=true

# ─── Site URL (SSR + SEO) ───────────────────
# Used by @nuxtjs/seo for sitemap, canonical URLs, and OG tags
# Production: https://applirank.com
# ─── SEO ─────────────────────────────────────────────────────────────────────
# Used by @nuxtjs/seo for sitemaps, canonical URLs, and OG tags
NUXT_PUBLIC_SITE_URL=http://localhost:3000

# Public URL used by preview upsell modal "Upgrade to hosted plan" button
# Public URL for the "Upgrade to hosted plan" button in the preview upsell modal
# NUXT_PUBLIC_HOSTED_PLAN_URL=https://applirank.com

# ─── Optional: Demo Mode ────────────────────
# Set to an org slug to make that org read-only (blocks mutations)
# ─── Optional: Demo Mode ─────────────────────────────────────────────────────
# Set to an org slug to make that org read-only (blocks all mutations)
# Default seeded slug: applirank-demo
# DEMO_ORG_SLUG=applirank-demo

# ─── Optional: Trusted Proxy ────────────────
# IP address of the reverse proxy (Railway/Cloudflare). When set,
# X-Forwarded-For is trusted for rate limiting IP extraction.
# ─── Optional: Trusted Proxy ─────────────────────────────────────────────────
# IP of the reverse proxy (Cloudflare, Railway, nginx). Enables accurate
# IP extraction from X-Forwarded-For for rate limiting.
# TRUSTED_PROXY_IP=

# ─── Optional: In-App Feedback ──────────────
# ─── Optional: In-App Feedback ───────────────────────────────────────────────
# Fine-grained GitHub PAT with Issues:write scope
# GITHUB_FEEDBACK_TOKEN=ghp_...
# GitHub repo in "owner/repo" format
# GITHUB_FEEDBACK_REPO=applirank/applirank

Loading