Email: - Add nodemailer; rewrite lib/email.ts to send via configured SMTP (Proton Mail Bridge) first, Resend fallback, then dev simulation. - Forward SMTP_* env to web and add protonmail-bridge service in compose. - Document Proton Bridge SMTP vars in .env.example files; add test-smtp.mjs. Apply: - OneClickApplyModal now opens the job's real posting URL (company/ATS site) in a new tab as the primary action when jobUrl is present, and records the external application so the card shows 'Applied'. - Internal one-click snapshot flow retained for jobs without an external URL. - POST /api/applications accepts external:true (skips profile completeness) and records an external application.
98 lines
2.9 KiB
YAML
98 lines
2.9 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: jobsboard_db
|
|
restart: always
|
|
environment:
|
|
POSTGRES_USER: "${POSTGRES_USER:-postgres}"
|
|
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-postgres}"
|
|
POSTGRES_DB: "${POSTGRES_DB:-jobsboard}"
|
|
ports:
|
|
- "${DB_PORT:-5432}:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./postgres-entrypoint.sh:/usr/local/bin/postgres-entrypoint.sh:ro
|
|
entrypoint: ["/usr/local/bin/postgres-entrypoint.sh"]
|
|
command: ["postgres"]
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-jobsboard}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- default
|
|
- mediaserver_default
|
|
|
|
web:
|
|
build:
|
|
context: ./web
|
|
dockerfile: Dockerfile
|
|
container_name: jobsboard_web
|
|
restart: always
|
|
ports:
|
|
- "${WEB_PORT:-3000}:3000"
|
|
environment:
|
|
DATABASE_URL: "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-jobsboard}?schema=public"
|
|
NEXTAUTH_SECRET: "${NEXTAUTH_SECRET:-jobsboard-secret-key-for-auth-sessions}"
|
|
NEXTAUTH_URL: "${NEXTAUTH_URL:-http://localhost:3000}"
|
|
NODE_ENV: "production"
|
|
OPENROUTER_API_KEY: "${OPENROUTER_API_KEY:-}"
|
|
OPENROUTER_MODEL: "${OPENROUTER_MODEL:-google/gemini-2.5-flash}"
|
|
SMTP_HOST: "${SMTP_HOST:-protonmail-bridge}"
|
|
SMTP_PORT: "${SMTP_PORT:-25}"
|
|
SMTP_USER: "${SMTP_USER:-}"
|
|
SMTP_PASS: "${SMTP_PASS:-}"
|
|
SMTP_FROM: "${SMTP_FROM:-JobsBoard <notifications@jobsboard.internal>}"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- default
|
|
- mediaserver_default
|
|
|
|
|
|
scraper:
|
|
build:
|
|
context: ./scraper
|
|
dockerfile: Dockerfile
|
|
container_name: jobsboard_scraper
|
|
restart: always
|
|
environment:
|
|
DATABASE_URL: "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-jobsboard}?schema=public"
|
|
SCRAPE_INTERVAL_MINUTES: "30"
|
|
SOCKS5_PROXY: "${SOCKS5_PROXY:-}"
|
|
PROXY_URL: "${PROXY_URL:-}"
|
|
PRIVADO_USER: "${PRIVADO_USER:-}"
|
|
PRIVADO_PASS: "${PRIVADO_PASS:-}"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- default
|
|
- mediaserver_default
|
|
|
|
# Proton Mail Bridge: local SMTP relay so the web app can send via Proton.
|
|
# Requires a one-time interactive login (see docs) to persist credentials.
|
|
protonmail-bridge:
|
|
image: dancwilliams/protonmail-bridge:latest
|
|
container_name: jobsboard_protonmail_bridge
|
|
restart: unless-stopped
|
|
environment:
|
|
KEYRING_PASSPHRASE: "${BRIDGE_KEYRING_PASSPHRASE:-}"
|
|
volumes:
|
|
- protonmail_bridge_data:/root
|
|
ports:
|
|
- "${BRIDGE_SMTP_PORT:-1025}:25"
|
|
networks:
|
|
- default
|
|
|
|
volumes:
|
|
postgres_data:
|
|
protonmail_bridge_data:
|
|
|
|
networks:
|
|
default:
|
|
mediaserver_default:
|
|
external: true
|