File size: 1,198 Bytes
c7d34c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ecb6084
c7d34c1
ecb6084
c7d34c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
name: gpt-image-playground-customer

services:
  postgres:
    image: postgres:16-alpine
    container_name: gpt-image-playground-postgres
    restart: unless-stopped
    environment:
      POSTGRES_DB: gpt_image_playground
      POSTGRES_USER: gpt_image
      POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
    secrets:
      - postgres_password
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U gpt_image -d gpt_image_playground"]
      interval: 10s
      timeout: 5s
      retries: 5
    volumes:
      - postgres-data:/var/lib/postgresql/data

  gpt-image-playground:
    environment:
      AGENT_STATE_BACKEND: postgres
      # Force Docker secret fields below even if .env.local contains direct database credentials.
      AGENT_DATABASE_URL: ""
      AGENT_DB_PASSWORD: ""
      AGENT_DB_HOST: postgres
      AGENT_DB_PORT: "5432"
      AGENT_DB_NAME: gpt_image_playground
      AGENT_DB_USER: gpt_image
      AGENT_DB_PASSWORD_FILE: /run/secrets/postgres_password
    secrets:
      - postgres_password
    depends_on:
      postgres:
        condition: service_healthy

volumes:
  postgres-data:

secrets:
  postgres_password:
    environment: GPT_IMAGE_POSTGRES_PASSWORD