|
| 1 | +# Dev container stack. Compose publishes ports on the host (more reliable than |
| 2 | +# devcontainer forwardPorts in some setups). Interpolation vars (SSH_PORT, etc.) |
| 3 | +# can be set in `.devcontainer/.env` (see `.devcontainer/.env.example`). |
| 4 | +# |
| 5 | +# Internal SSH: devcontainers `sshd` feature listens on 2222, not 22 — map host:2222. |
| 6 | +# |
| 7 | +# Explicit DNS: containers on external networks (e.g. `dev`) sometimes get no working resolver |
| 8 | +# and `uv pip` fails with "dns error" / "failed to lookup address information". |
| 9 | +# Override in `.devcontainer/.env`: DEVCONTAINER_DNS_1 / DEVCONTAINER_DNS_2. |
| 10 | +services: |
| 11 | + devcontainer: |
| 12 | + build: |
| 13 | + context: .. |
| 14 | + dockerfile: .devcontainer/Dockerfile |
| 15 | + dns: |
| 16 | + - "${DEVCONTAINER_DNS_1:-1.1.1.1}" |
| 17 | + - "${DEVCONTAINER_DNS_2:-8.8.8.8}" |
| 18 | + env_file: |
| 19 | + - ../.env |
| 20 | + environment: |
| 21 | + # Avoid ~/.cache/uv (often root-owned after sshd/common-utils); workspace is bind-mounted as vscode. |
| 22 | + UV_CACHE_DIR: /workspaces/project/.uv-cache |
| 23 | + SELENIUM_REMOTE_URL: ${SELENIUM_REMOTE_URL:-http://gme-selenium-firefox:4444} |
| 24 | + ports: |
| 25 | + - "${SSH_PORT:-2222}:2222" |
| 26 | + - "${APP_PORT:-1234}:1234" |
| 27 | + - "${DEV_PORT:-8888}:8888" |
| 28 | + volumes: |
| 29 | + - ..:/workspaces/project:cached |
| 30 | + command: sleep infinity |
| 31 | + networks: |
| 32 | + - dev |
| 33 | + gme-qdrant: |
| 34 | + image: qdrant/qdrant:latest |
| 35 | + container_name: gme-qdrant |
| 36 | + ports: |
| 37 | + - "6333:6333" |
| 38 | + - "6334:6334" |
| 39 | + volumes: |
| 40 | + - ../data/qdrant/storage:/qdrant/storage |
| 41 | + restart: unless-stopped |
| 42 | + networks: |
| 43 | + - dev |
| 44 | + # README "Option B": multi-session standalone Firefox (ORCID, Selenium-backed tools). |
| 45 | + gme-selenium-firefox: |
| 46 | + image: selenium/standalone-firefox |
| 47 | + container_name: gme-selenium-firefox |
| 48 | + ports: |
| 49 | + - "${SELENIUM_GRID_PORT:-4444}:4444" |
| 50 | + - "${SELENIUM_VNC_PORT:-7900}:7900" |
| 51 | + shm_size: "2g" |
| 52 | + environment: |
| 53 | + SE_NODE_MAX_SESSIONS: "5" |
| 54 | + SE_NODE_SESSION_TIMEOUT: "300" |
| 55 | + restart: unless-stopped |
| 56 | + networks: |
| 57 | + - dev |
| 58 | + |
| 59 | +networks: |
| 60 | + dev: |
| 61 | + external: true |
0 commit comments