-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (70 loc) · 2.21 KB
/
docker-compose.yml
File metadata and controls
72 lines (70 loc) · 2.21 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
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "5000:5000"
command: ["node", "--experimental-specifier-resolution=node", "production-server.js"]
container_name: oai-app
environment:
- NODE_ENV=production
# Set a clear database URL that uses the postgres service
- DATABASE_URL=postgres://${PGUSER}:${PGPASSWORD}@postgres:5432/${PGDATABASE}
- SESSION_SECRET=${SESSION_SECRET}
# - OPENAI_API_KEY=${OPENAI_API_KEY}
# Make sure the standard PostgreSQL environment variables are set correctly
- PGHOST=postgres
- PGUSER=${PGUSER}
- PGPASSWORD=${PGPASSWORD}
- PGDATABASE=${PGDATABASE}
- PGPORT=${PGPORT}
- SMTP_FROM=${SMTP_FROM}
- SMTP_RELAY_SERVER=${SMTP_RELAY_SERVER}
- SMTP_RELAY_PORT=${SMTP_RELAY_PORT}
- SMTP_RELAY_USER=${SMTP_RELAY_USER}
- SMTP_RELAY_PASSWORD=${SMTP_RELAY_PASSWORD}
- GOOGLE_ID=${GOOGLE_ID}
- GOOGLE_SECRET=${GOOGLE_SECRET}
- GOOGLE_CALLBACK=${GOOGLE_CALLBACK}
- GITHUB_ID=${GITHUB_ID}
- GITHUB_SECRET=${GITHUB_SECRET}
- GITHUB_CALLBACK=${GITHUB_CALLBACK}
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
- openai-assistant-interface_app_logs:/app/logs
- openai-assistant-interface_app_uploads:/app/uploads
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
postgres:
image: postgres:14-alpine
container_name: oai-db
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_DB=${PGDATABASE}
- POSTGRES_PORT=${PGPORT}
ports:
- "${PGPORT}:${PGPORT}"
volumes:
- openai-assistant-interface_postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PGUSER} -d ${PGDATABASE}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
openai-assistant-interface_app_logs:
external: true
openai-assistant-interface_app_uploads:
external: true
openai-assistant-interface_postgres_data:
external: true