-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.88 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
services:
backend:
build:
context: ./backend
restart: unless-stopped
ports:
- "127.0.0.1:8050:8000"
environment:
APP_ENV: "${APP_ENV:-production}"
DATABASE_URL: "sqlite:////app/data/antique_catalogue.db"
UPLOADS_PATH: "/app/uploads"
# Required: generate one with `openssl rand -hex 32` and put it in .env
JWT_SECRET: "${JWT_SECRET:?JWT_SECRET must be set (e.g. in .env)}"
JWT_ALGORITHM: "${JWT_ALGORITHM:-HS256}"
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: "${JWT_ACCESS_TOKEN_EXPIRE_MINUTES:-30}"
AUTO_VERIFY_EMAIL: "${AUTO_VERIFY_EMAIL:-false}"
REFRESH_TOKEN_COOKIE_PATH: "${REFRESH_TOKEN_COOKIE_PATH:-/}"
# Set true when the app is served over HTTPS
REFRESH_TOKEN_COOKIE_SECURE: "${REFRESH_TOKEN_COOKIE_SECURE:-false}"
ADMIN_EMAIL: "${ADMIN_EMAIL:-}"
ADMIN_PASSWORD: "${ADMIN_PASSWORD:-}"
ADMIN_TOKEN_EXPIRE_MINUTES: "${ADMIN_TOKEN_EXPIRE_MINUTES:-60}"
SMTP_HOST: "${SMTP_HOST:-}"
SMTP_PORT: "${SMTP_PORT:-587}"
SMTP_USER: "${SMTP_USER:-}"
SMTP_PASSWORD: "${SMTP_PASSWORD:-}"
SMTP_FROM: "${SMTP_FROM:-}"
SMTP_USE_TLS: "${SMTP_USE_TLS:-true}"
volumes:
- backend-data:/app/data
- backend-uploads:/app/uploads
command: >
sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"
frontend:
build:
context: ./frontend
restart: unless-stopped
ports:
- "127.0.0.1:3010:3000"
environment:
# Uses /api by default (relative URL, works on any domain)
# Set NEXT_PUBLIC_API_URL for local dev: http://localhost:8000
NEXT_PUBLIC_API_URL: "/api"
# Used by Next.js server components (e.g. homepage featured fetches)
# so frontend can reach backend directly in Docker.
INTERNAL_API_URL: "http://backend:8000"
depends_on:
- backend
volumes:
backend-data:
backend-uploads: