-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.prod.yml
113 lines (106 loc) · 3.52 KB
/
docker-compose.prod.yml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
volumes:
node-data: {}
postgres_db: {}
files_cache: {}
services:
# Hasura GraphQL Engine
hasura:
image: hasura/graphql-engine:v2.40.0.cli-migrations-v3
depends_on:
backend:
condition: service_healthy
volumes:
- ./hasura/metadata:/hasura-metadata
restart: unless-stopped
environment:
# Essential Environment Variables
HASURA_GRAPHQL_METADATA_DATABASE_URL: ${DATABASE_URL}
HASURA_GRAPHQL_DATABASE_URL: ${DATABASE_URL}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET} # Admin access secret
HASURA_GRAPHQL_JWT_SECRET: ${HASURA_GRAPHQL_JWT_SECRET} # JWT authentication secret
# Console and Development Mode
HASURA_GRAPHQL_ENABLE_CONSOLE: ${HASURA_GRAPHQL_ENABLE_CONSOLE} # Disable console in production
HASURA_GRAPHQL_DEV_MODE: "false" # Disable development mode features
# Role and CORS Settings
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: user # Default role for unauthenticated users
HASURA_GRAPHQL_CORS_DOMAIN: ${HASURA_GRAPHQL_CORS_DOMAIN} # Allowed domains for CORS
HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES: "true"
# Performance and Connection Settings
HASURA_GRAPHQL_MAX_CONNECTIONS: 100 # Maximum number of database connections
HASURA_GRAPHQL_STRIPES: 2 # Number of connection pool stripes
HASURA_GRAPHQL_CONNECTIONS_PER_STRIPE: 50 # Connections per stripe
HASURA_GRAPHQL_IDLE_TIMEOUT: 180 # Idle connection timeout in seconds
HASURA_GRAPHQL_TIMEOUT: 60 # Request timeout in seconds
# Logging Settings
HASURA_GRAPHQL_LOG_LEVEL: "warn" # Log verbosity level
HASURA_GRAPHQL_ENABLED_LOG_TYPES: "startup,http-log,webhook-log,websocket-log,query-log" # Enabled log types
# Security and Authorization
HASURA_GRAPHQL_ENABLE_ALLOWLIST: "false" # Disable query allowlisting
# Hasura Migrations and Metadata
HASURA_GRAPHQL_METADATA_DIR: /hasura-metadata
ports:
- "${HASURA_GRAPHQL_PORT}:8080"
command:
- graphql-engine
- serve
profiles:
- base
logging:
driver: loki
options:
loki-url: "https://logging.subspace.network/loki/api/v1/push"
rabbitmq:
image: rabbitmq:3-management
ports:
- "${RABBITMQ_PORT}:5672"
- "${RABBITMQ_MANAGEMENT_PORT}:15672"
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
profiles:
- rabbit
logging:
driver: loki
options:
loki-url: "https://logging.subspace.network/loki/api/v1/push"
backend:
image: ${BACKEND_IMAGE}
volumes:
- files_cache:/usr/src/app/.cache
ports:
- "3000:3000"
restart: unless-stopped
env_file:
- .env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 15s
timeout: 10s
retries: 3
profiles:
- base
logging:
driver: loki
options:
loki-url: "https://logging.subspace.network/loki/api/v1/push"
agent:
container_name: newrelic-infra
image: newrelic/infrastructure:latest
cap_add:
- SYS_PTRACE
network_mode: bridge
pid: host
privileged: true
volumes:
- "/:/host:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
NRIA_LICENSE_KEY: "${NR_API_KEY}"
NRIA_DISPLAY_NAME: "${NR_AGENT_IDENTIFIER}"
restart: unless-stopped
profiles:
- base
logging:
driver: loki
options:
loki-url: "https://logging.subspace.network/loki/api/v1/push"