Skip to content

Instantly share code, notes, and snippets.

@jrichardsz
Created August 27, 2022 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrichardsz/908ef28006d859a10bf6f647e7b986b0 to your computer and use it in GitHub Desktop.
Save jrichardsz/908ef28006d859a10bf6f647e7b986b0 to your computer and use it in GitHub Desktop.
docker scale nodes

https://pspdfkit.com/blog/2018/how-to-use-docker-compose-to-run-multiple-instances-of-a-service-in-development/

version: "3"

services:
  db:
    image: postgres:latest
    environment:
      POSTGRES_USER: pspdfkit
      POSTGRES_PASSWORD: password
      # ... other environment variables
  pspdfkit:
    image: "pspdfkit/pspdfkit:latest"

    environment:
      PGUSER: pspdfkit
      PGPASSWORD: password
      # ... other environment variables
    depends_on:
      - db
    ports:
      - "5000"
user  nginx;

events {
    worker_connections   1000;
}
http {
        server {
              listen 80;
              location / {
                proxy_pass http://access-api:80;
              }
        }
}
docker-compose up --scale pspdfkit=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment