-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (72 loc) · 2.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (72 loc) · 2.54 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# TEA Platform - Production Docker Compose for Self-Hosting
#
# This file sets up a complete production-ready stack including:
# - PostgreSQL database with persistent storage
# - TEA Platform application with automatic migrations
#
# Usage:
# 1. Copy .env.example to .env and configure your settings
# 2. Run: docker-compose up -d
# 3. Access the application at http://localhost:3000
#
# For local development, use docker-compose.local.yml instead.
services:
postgres:
image: postgres:15-alpine
container_name: tea_postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-tea}
POSTGRES_USER: ${POSTGRES_USER:-tea_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tea_password}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- tea_network
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-tea_user} -d ${POSTGRES_DB:-tea}']
interval: 10s
timeout: 5s
retries: 5
tea_app:
image: ghcr.io/alan-turing-institute/assuranceplatform:latest
# Alternatively, build from source:
# build:
# context: .
# dockerfile: Dockerfile
container_name: tea_app
restart: unless-stopped
ports:
- '${APP_PORT:-3000}:3000'
depends_on:
postgres:
condition: service_healthy
environment:
# Database - uses internal Docker network hostname
DATABASE_URL: postgresql://${POSTGRES_USER:-tea_user}:${POSTGRES_PASSWORD:-tea_password}@postgres:5432/${POSTGRES_DB:-tea}
# NextAuth - REQUIRED: Change these for production
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
# GitHub OAuth - REQUIRED for GitHub login
GITHUB_APP_CLIENT_ID: ${GITHUB_APP_CLIENT_ID}
GITHUB_APP_CLIENT_SECRET: ${GITHUB_APP_CLIENT_SECRET}
# File Storage - choose ONE option:
# Option 1: Local filesystem (default for self-hosting)
USE_LOCAL_STORAGE: ${USE_LOCAL_STORAGE:-true}
# Option 2: Azure Blob Storage (for cloud deployments)
# AZURE_STORAGE_ACCOUNT_NAME: ${AZURE_STORAGE_ACCOUNT_NAME}
# AZURE_STORAGE_ACCOUNT_KEY: ${AZURE_STORAGE_ACCOUNT_KEY}
# Optional: Azure Communication Services (for email notifications)
# ACS_CONNECTION_STRING: ${ACS_CONNECTION_STRING}
# ACS_SENDER_ADDRESS: ${ACS_SENDER_ADDRESS}
NODE_ENV: production
volumes:
- uploads_data:/app/public/uploads
networks:
- tea_network
networks:
tea_network:
driver: bridge
volumes:
postgres_data:
uploads_data: