Shopify / Shopify/toxiproxy

Add docker compose sample

Open
#647 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
12.4k
Forks
510
PR merge metrics
No merged PRs in 30d

Description

I think that a docker compose sample for simple scenarios would be useful for those who are trying to create a simple configuration for testing. My final sample for fixed toxics is like below, but possibly something even simpler could be created.

services:
  db:
    container_name: sample_postgres_container
    image: postgres:17.5
    environment:
      POSTGRES_USER: ${POSTGRES_USER:-postgres}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
      POSTGRES_DB: sample
      PGDATA: /data/postgres
    volumes:
       - sample_postgres:/data/postgres
    ports:
      - "5433:5432"
    networks:
      - sample_postgres
  toxiproxy:
    container_name: sample_toxiproxy_container
    image: ghcr.io/shopify/toxiproxy:2.12.0
    links:
      - db
    ports:
      - "8474:8474"
      - "5434:5434"
    environment:
      LOG_LEVEL: info
    networks:
      - sample_postgres
    post_start:
      - command: "/toxiproxy-cli create -l 0.0.0.0:5434 -u db:5432 postgres1ms"
      - command: "/toxiproxy-cli toxic add -t latency -a latency=1 postgres1ms"

networks:
  sample_postgres:
    driver: bridge

volumes:
    sample_postgres:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository file, test, or entry point. Start with the proposed Docker Compose configuration and inspect the repository for existing sample conventions; done means adding a simpler working compose sample for basic testing scenarios.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, postgresql
Domain
devops, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.