Some checks failed
CI/CD Pipeline / Run Tests (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (push) Has been cancelled
CI/CD Pipeline / Code Quality (push) Has been cancelled
CI Pipeline / Lint Code (push) Has been cancelled
CI Pipeline / Test API Package (push) Has been cancelled
CI Pipeline / Test Web Package (push) Has been cancelled
CI Pipeline / Test Shared Package (push) Has been cancelled
CI Pipeline / Build All Packages (push) Has been cancelled
CI Pipeline / Generate Coverage Report (push) Has been cancelled
Docker Build & Deploy / Build Docker Images (push) Has been cancelled
Docker Build & Deploy / Push Docker Images (push) Has been cancelled
Docker Build & Deploy / Deploy to Staging (push) Has been cancelled
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
E2E Tests / End-to-End Tests (push) Has been cancelled
E2E Tests / E2E Tests (Mobile) (push) Has been cancelled
Security Scanning / NPM Audit (push) Has been cancelled
Security Scanning / Dependency License Check (push) Has been cancelled
Security Scanning / Code Quality Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
- Add APP_URL to fix Google OAuth redirect to localhost:5173 - Add API_URL for consistent frontend API endpoint configuration - Set both to https://basil.pkartchner.com in production
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: basil-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: basil
|
|
POSTGRES_PASSWORD: basil
|
|
POSTGRES_DB: basil
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U basil"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: packages/api/Dockerfile
|
|
container_name: basil-api
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 3001
|
|
# Use DATABASE_URL from .env if set, otherwise default to local postgres
|
|
DATABASE_URL: ${DATABASE_URL:-postgresql://basil:basil@postgres:5432/basil?schema=public}
|
|
STORAGE_TYPE: local
|
|
LOCAL_STORAGE_PATH: /app/uploads
|
|
BACKUP_PATH: /app/backups
|
|
CORS_ORIGIN: https://basil.pkartchner.com
|
|
# JWT Configuration
|
|
JWT_SECRET: ${JWT_SECRET:-change-this-to-a-random-secret-min-32-characters-long}
|
|
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-change-this-to-another-random-secret-min-32-characters}
|
|
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-15m}
|
|
JWT_REFRESH_EXPIRES_IN: ${JWT_REFRESH_EXPIRES_IN:-7d}
|
|
# Google OAuth
|
|
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID}
|
|
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET}
|
|
GOOGLE_CALLBACK_URL: ${GOOGLE_CALLBACK_URL:-https://basil.pkartchner.com/api/auth/google/callback}
|
|
# Application URLs
|
|
APP_URL: ${APP_URL:-https://basil.pkartchner.com}
|
|
API_URL: ${API_URL:-https://basil.pkartchner.com}
|
|
volumes:
|
|
- uploads_data:/app/uploads
|
|
- backups_data:/app/backups
|
|
networks:
|
|
- internal
|
|
- traefik
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
dockerfile: packages/web/Dockerfile
|
|
container_name: basil-web
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- api
|
|
networks:
|
|
- traefik
|
|
- internal
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.basil.rule=Host(`basil.pkartchner.com`)"
|
|
- "traefik.http.routers.basil.entrypoints=https"
|
|
- "traefik.http.routers.basil.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.basil.loadbalancer.server.port=80"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
uploads_data:
|
|
backups_data:
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
internal:
|
|
driver: bridge
|