File size: 1,186 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
# This file extends the main docker-compose.yml for development purposes.
# It adds a dedicated service for the VS Code Dev Container.

services:
  # This is our new development environment service
  dev-environment:
    # We use the official MS dev container image, which supports ARM64
    image: mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye
    
    # Mount the entire project directory into the container for live editing
    volumes:
      - ..:/workspaces/WidgeTDC:cached

    # Keep the container running indefinitely
    command: sleep infinity

    # Connect to the same network as the other services (postgres, redis, etc.)
    networks:
      - widgetdc-network

    # Copy environment variables from the backend service to allow connections to databases.
    # The hostnames (e.g., 'postgres', 'redis') work because we are on the same Docker 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