File size: 2,569 Bytes
5a81b95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# A minimal Docker Compose file for the Dev Container environment.
# It only starts the necessary data services and the dev container itself,
# completely bypassing the complex production builds from the root docker-compose.yml.

version: '3.8'

services:
  # The Development Environment Container
  dev-environment:
    image: mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye
    volumes:
      - ..:/workspaces/WidgeTDC:cached
    command: sleep infinity
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
      neo4j:
        condition: service_healthy
    networks:
      - widgetdc-network
    environment:
      POSTGRES_HOST: postgres
      POSTGRES_PORT: 5432
      POSTGRES_USER: widgetdc
      POSTGRES_PASSWORD: widgetdc_dev
      POSTGRES_DB: widgetdc
      REDIS_HOST: redis
      REDIS_PORT: 6379
      NEO4J_URI: bolt://neo4j:7687
      NEO4J_USER: neo4j
      NEO4J_PASSWORD: password

  # --- DATA SERVICES (copied from the original docker-compose.yml) ---

  postgres:
    image: ankane/pgvector:latest
    container_name: widgetdc-postgres-dev
    environment:
      POSTGRES_USER: widgetdc
      POSTGRES_PASSWORD: widgetdc_dev
      POSTGRES_DB: widgetdc
    ports:
      - "5433:5432"
    volumes:
      - postgres_data_dev:/var/lib/postgresql/data
    networks:
      - widgetdc-network
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U widgetdc -d widgetdc"]
      interval: 10s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    container_name: widgetdc-redis-dev
    ports:
      - "6379:6379"
    volumes:
      - redis_data_dev:/data
    command: redis-server --appendonly yes
    networks:
      - widgetdc-network
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5

  neo4j:
    image: neo4j:5.15
    container_name: widgetdc-neo4j-dev
    hostname: neo4j-dev
    ports:
      - "7474:7474"
      - "7687:7687"
    environment:
      NEO4J_AUTH: neo4j/password
      NEO4J_PLUGINS: '["apoc"]'
    volumes:
      - neo4j_data_dev:/data
    networks:
      - widgetdc-network
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "cypher-shell -u neo4j -p password 'RETURN 1' || exit 1"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 60s

networks:
  widgetdc-network:
    name: widgetdc-network-dev

volumes:
  postgres_data_dev:
  redis_data_dev:
  neo4j_data_dev: